-
-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add .mjs to the examples #683
Conversation
As developers are starting to publish `.mjs` files to npm, people are starting to see breakage in unexpected ways (e.g. [this tweet](https://twitter.com/capajj/status/1042836215022735361)) due to the fact that most `babel-loader` users copy and paste the `test: /\.js$/` line into their config. While we can't update everyone's existing configs, we can update the canonical examples. /cc @mathiasbynens @developit
See babel#683 for details.
I admit, I'm very on the fence here because it seems like publishing |
I guess at the end of the day it's not really our call how people do this, but boy does it seem like a terrible idea at the moment. |
I've never been crazy about the extension name myself, but since all modern browsers already do ship a module implementation that actually runs code differently from how it runs regular scripts, I think it's wise to recommend developers use a different extension in order to express the intent of where the code will be run. My colleague @mathiasbynens wrote an article promoting I've added a note to one of my blogs posts around the potential gotchas of |
Yeah, I'm actually 100% for In the end though, I do think this PR is something we should just land, I just feel that the need for this PR indicates further pain for the community in the future, since people are going to adopt it expecting it to interop with CommonJS nicely, and that's still entirely undefined beyond experimental implementations. Users are going to be pissed if all their code stops working in some future Webpack version. |
I think those are very valid concerns. And I agree future pain seems likely ... I'm just hoping we can minimize it as much as possible. |
The higher-order bit is that not using Modulo some proposals that were explicitly rejected (e.g. I think this discussion is orthogonal to this PR, though. |
## The devDependency [babel-loader](https://github.com/babel/babel-loader) was updated from `7.1.5` to `8.0.3`. This version is **not covered** by your **current version range**. If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update. --- <details> <summary>Release Notes for v8.0.3</summary> <h3>Features</h3> <ul> <li><a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="363280376" data-permission-text="Issue title is private" data-url="babel/babel-loader#687" href="https://urls.greenkeeper.io/babel/babel-loader/pull/687">#687</a> - Add <code>customize</code> option</li> </ul> <h3>Bugs</h3> <ul> <li><a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="362860284" data-permission-text="Issue title is private" data-url="babel/babel-loader#685" href="https://urls.greenkeeper.io/babel/babel-loader/pull/685">#685</a> - Also pass the caller option to loadPartialConfig</li> </ul> <h3>Docs</h3> <ul> <li><a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="361610577" data-permission-text="Issue title is private" data-url="babel/babel-loader#681" href="https://urls.greenkeeper.io/babel/babel-loader/pull/681">#681</a> - Update the README links to use the new options docs</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="362787813" data-permission-text="Issue title is private" data-url="babel/babel-loader#683" href="https://urls.greenkeeper.io/babel/babel-loader/pull/683">#683</a> - Add .mjs to the examples</li> </ul> <h3>Internal</h3> <p>Some dev dependency updates and CI tweaks.</p> </details> <details> <summary>Commits</summary> <p>The new version differs by 77 commits ahead by 77, behind by 9.</p> <ul> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/800181b91dc4136bdb1d068f1fe730998eac6512"><code>800181b</code></a> <code>8.0.3</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/7d8500ced72046d4c5c1dcdc7a9c0016d7e6c15b"><code>7d8500c</code></a> <code>Also pass the caller option to loadPartialConfig (#685)</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/a50791472f1f706bf2ec4ea06427df2dd8b31080"><code>a507914</code></a> <code>Expose the full loader options to all overrides hooks.</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/ac0c869b86b98881ac5544bf7248c63a971b7219"><code>ac0c869</code></a> <code>Tweak the customize implementation to be a bit more strict.</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/9b70a02b3069000133122c09271ce0a7144f8dae"><code>9b70a02</code></a> <code>Add overrides option</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/c8d7a7287a6b0dc60480b026159f0486ac9bf074"><code>c8d7a72</code></a> <code>Add .mjs to the examples (#683)</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/461999323585fdaa420530a9f85ff5701a7d298e"><code>4619993</code></a> <code>bable options link update (#681)</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/8f240b498bb24ef89f7b306f5ac806e84b813b0d"><code>8f240b4</code></a> <code>Use node 10 on appveyor</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/7e4189ebb6e313df460de25949503e73cb260bf6"><code>7e4189e</code></a> <code>Change appveyor to use babel account</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/eeaee463232e786d030716894ed4f66e505acbde"><code>eeaee46</code></a> <code>Update devDeps to use most recent versions, and fix tests.</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/3e5fb5e3ab9bd02d6955625bde4c71fee1619473"><code>3e5fb5e</code></a> <code>chore(package): update lockfile</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/2b8e479e50ce6dc7fc0bc5ae700951b9631a4959"><code>2b8e479</code></a> <code>chore(package): update eslint-config-babel to version 8.0.0</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/0e43d0ab51d3b3f627e39d82e85b40a99c6316e3"><code>0e43d0a</code></a> <code>8.0.2</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/5e0565d1199bcf42c238657f48460727680a2864"><code>5e0565d</code></a> <code>Manually fix 'inline' sourcemaps so they work with Webpack. (#671)</code></li> <li><a href="https://urls.greenkeeper.io/babel/babel-loader/commit/ea52d05a41c4b44288348093ac3bb7ef52fa60bc"><code>ea52d05</code></a> <code>Use 'sourceMaps' since that is what we suggest to use in our docs. (#670)</code></li> </ul> <p>There are 77 commits in total.</p> <p>See the <a href="https://urls.greenkeeper.io/babel/babel-loader/compare/f3bfed932a959f7ffe3633e7f88cba0f3fcbf7b2...800181b91dc4136bdb1d068f1fe730998eac6512">full diff</a></p> </details> <details> <summary>FAQ and help</summary> There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new). </details> --- Your [Greenkeeper](https://greenkeeper.io) bot 🌴
As developers are starting to publish
.mjs
files to npm, people are starting to see breakage in unexpected ways (e.g. this tweet) due to the fact that mostbabel-loader
users copy and paste thetest: /\.js$/
line into their config.While we can't update everyone's existing configs, we can update the canonical examples.
/cc @mathiasbynens @developit
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Does this PR introduce a breaking change?