gaearon / gaearon/react-hot-loader

Feature: allow webpack 4 type javascript/esm

Open
#875 1 comment 3 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.