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

"module" export should by an .mjs file #1165

Closed
developit opened this issue Jul 10, 2018 · 0 comments
Closed

"module" export should by an .mjs file #1165

developit opened this issue Jul 10, 2018 · 0 comments

Comments

@developit
Copy link
Member

This is important because right now, dist/preact.esm.js is actually not treated as a strict Module by Webpack 4. You can try this out:

// name this file foo.mjs
import { options } from 'preact';

Running the above through a vanilla Webpack config will resolve preact to node_modules/preact/dist/preact.esm.js, but will then throw an exception since Webpack does not infer strict ESM validity from the package.json "module" fields - it's only inferred from the file 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

1 participant