Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

showcase sample configs with respect to .mjs #682

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Within your webpack configuration object, you'll need to add the babel-loader to
module: {
rules: [
{
test: /\.js$/,
test: /\.(js|mjs)$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
Expand All @@ -68,7 +68,7 @@ You can pass options to the loader by using the [`options`](https://webpack.js.o
module: {
rules: [
{
test: /\.js$/,
test: /\.(js|mjs)$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
Expand Down Expand Up @@ -119,7 +119,7 @@ rules: [
// the 'transform-runtime' plugin tells Babel to
// require the runtime instead of inlining it.
{
test: /\.js$/,
test: /\.(js|mjs)$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
Expand Down Expand Up @@ -183,7 +183,7 @@ require('./app');
If you receive this message, it means that you have the npm package `babel` installed and are using the short notation of the loader in the webpack config (which is not valid anymore as of webpack 2.x):
```javascript
{
test: /\.js$/,
test: /\.(js|mjs)$/,
loader: 'babel',
}
```
Expand All @@ -194,7 +194,7 @@ To fix this, you should uninstall the npm package `babel`, as it is deprecated i
In the case one of your dependencies is installing `babel` and you cannot uninstall it yourself, use the complete name of the loader in the webpack config:
```javascript
{
test: /\.js$/,
test: /\.(js|mjs)$/,
loader: 'babel-loader',
}
```
Expand Down