-
Notifications
You must be signed in to change notification settings - Fork 787
require
in .mjs files
#1589
Comments
Regarding
If you can figure out how to import these and have |
It looks like #1617 will solve the |
Kind of related: babel/babel#7294. There is a workaround I have shipped in |
Does .mjs allow importing common js .js files? If the answer is yes, then maybe we could wrap the packages and provide a default (or named) export, something like this: // some_file.mjs
import invariant from './invariant';
... // invariant.js
exports.default = require('invariant'); |
|
This is unfortunately still an issue when bundling with Rollup. |
We have a new esm build already merged and will be released next. |
It is invalid for
require
to appear in .mjs files. This is currently happening in distributed files:Version
The text was updated successfully, but these errors were encountered: