gaearon / gaearon/react-hot-loader
Feature: allow webpack 4 type javascript/esm
Open
discussion
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 775
- PR merge metrics
- No merged PRs in 30d
Description
In webpack 4 we can set file types such as "javascript/esm" which have more restriction.
With type "javascript/esm" we can't use `require`, `exports` and `module` anymore. But there is still `import`, `export` and `__webpack_module__`
Could it be possible to add a `esm` param to the babel plugin to be able to only use esm import/export
```
// .babelrc
{
"plugins": [["react-hot-loader/babel",{esm:true}]]
}
```
Contributor guide
Assessment
This issue has not been assessed yet.