You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Packages should publish .mjs (ESM) files sibling to .js (CJS) files and use extensionless imports to support both Node.js native modules and traditional CJS environments. I'm already using .mjs in 4+ packages and use native modules for a few APIs.
Webpack v4 beta supports .mjs while v3 has a lot of issues; namely it resolves .js instead of .mjs for extensionless imports. This stuffs up tree-shaking and incorrectly results in almost identical size-limit results for .mjs and .js entries.
The latest webpack release is v4.0.0-beta.2. According to this tweet, v4 will ship at least a month after the first release candidate. This could be months away; I don't think waiting for a "stable" release is worth delaying an update.
The text was updated successfully, but these errors were encountered:
Packages should publish
.mjs
(ESM) files sibling to.js
(CJS) files and use extensionless imports to support both Node.js native modules and traditional CJS environments. I'm already using.mjs
in 4+ packages and use native modules for a few APIs.Webpack v4 beta supports
.mjs
while v3 has a lot of issues; namely it resolves.js
instead of.mjs
for extensionless imports. This stuffs up tree-shaking and incorrectly results in almost identicalsize-limit
results for.mjs
and.js
entries.The latest webpack release is v4.0.0-beta.2. According to this tweet, v4 will ship at least a month after the first release candidate. This could be months away; I don't think waiting for a "stable" release is worth delaying an update.
The text was updated successfully, but these errors were encountered: