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

compatibility with .mjs specification #4

Open
lorenzofox3 opened this issue Aug 7, 2018 · 2 comments
Open

compatibility with .mjs specification #4

lorenzofox3 opened this issue Aug 7, 2018 · 2 comments

Comments

@lorenzofox3
Copy link

The package can not be imported from a .mjs file:
the "main" entry point refers to a cjs with other export than a default.

  1. main should not specify an extension.
  2. this "main" should have both version: a .mjs version with the ES6 module and a .js with the CJS version.

You can have a look this issue for more details

Thanks !

@rauschma
Copy link
Owner

rauschma commented Aug 9, 2018

I’ll update this code once there is an actual standard. At the moment, everything is in flux.

@lorenzofox3
Copy link
Author

I understand your point.
However there is no code to change, only the build script (I can do it if it 's too much of a trouble) and the package.json.
Moreover that would be a quick win for various build tools whereas there should not be any drawback/non backward changes.

Otherwise what would you suggest me to do to workaround the faced issue ?

  • I could include your package in the bundle when I build my library. The downside is that I would have to rebuild and republish a version whenever you publish a new version (which somehow breaks the concept of dependency :) )
  • Anyway, your library is small enough and does not change a lot. I could simply copy/paste the code (with the same problems than above though)
  • drop the support of .mjs extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants