Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: exported modules from core should be mapped with their types #1171

Closed
Tracked by #948
louis-jan opened this issue Dec 22, 2023 · 0 comments
Closed
Tracked by #948
Assignees
Labels
Milestone

Comments

@louis-jan
Copy link
Contributor

louis-jan commented Dec 22, 2023

Problem
In PR #948, we encountered an issue where we could not import node modules exported by @janhq/core but were only able to require them since modules were not exported accordingly.

In this PR, we refactored to have three exported modules:

  • @janhq/core: default UMD module root, serving as its core SDK, can be imported from both browsers and Node.
  • @janhq/core/sdk: ES5 core SDK module, importable from browser projects.
  • @janhq/core/node: CommonJS Node module, importable from Node projects.

Success Criteria
Refactored modules import

// from 
const node = require('@janhq/core/dist/node/index.cjs')
// to
import  { ... } from '@janhq/core/node'

Additional context
Include any other relevant context or screenshots about the feature request here.

@louis-jan louis-jan added the type: feature request A new feature label Dec 22, 2023
@louis-jan louis-jan self-assigned this Dec 22, 2023
@louis-jan louis-jan added this to the v0.4.4 milestone Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

1 participant