Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 0abd6ba

Browse files
committed
Fix webpack.config to exclude node_modules
If it's a string it actually has to be an absolute path to exclude. Using a regex like this seems to be the norm that most people do. The benefit is that we no longer transform code like React's which is already transformed. We also don't use `.jsx` files, so I dropped that support from the regex too. The `helper.js` file doesn't seem to exist anymore, so I removed it from the exclusion list.
1 parent 7e8d6e7 commit 0abd6ba

File tree

6 files changed

+12
-25
lines changed

6 files changed

+12
-25
lines changed

backend/integration/webpack.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ module.exports = {
4343
wrappedContextCritical: false,
4444

4545
loaders: [{
46-
test: /\.jsx?$/,
46+
test: /\.js$/,
4747
loader: 'babel-loader?stage=0',
48-
exclude: [
49-
'node_modules',
50-
],
48+
exclude: /node_modules/,
5149
}],
5250
},
5351
};

shells/chrome/webpack.backend.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@ module.exports = {
2525

2626
module: {
2727
loaders: [{
28-
test: /\.jsx?$/,
28+
test: /\.js$/,
2929
loader: 'babel-loader?stage=0',
30-
exclude: [
31-
'node_modules',
32-
'./helpers.js',
33-
],
30+
exclude: /node_modules/,
3431
}],
3532
},
3633

shells/chrome/webpack.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ module.exports = {
2727

2828
module: {
2929
loaders: [{
30-
test: /\.jsx?$/,
30+
test: /\.js$/,
3131
loader: 'babel-loader?stage=0',
32-
exclude: [
33-
'node_modules',
34-
],
32+
exclude: /node_modules/,
3533
}],
3634
},
3735
};

shells/firefox/webpack.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ module.exports = {
2424

2525
module: {
2626
loaders: [{
27-
test: /\.jsx?$/,
27+
test: /\.js$/,
2828
loader: 'babel-loader?stage=0',
29-
exclude: [
30-
'node_modules',
31-
],
29+
exclude: /node_modules/,
3230
}],
3331
},
3432
};

shells/plain/webpack.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ module.exports = {
2222

2323
module: {
2424
loaders: [{
25-
test: /\.jsx?$/,
25+
test: /\.js$/,
2626
loader: 'babel-loader?stage=0',
27-
exclude: [
28-
'node_modules',
29-
],
27+
exclude: /node_modules/,
3028
}],
3129
},
3230
};

test/example/webpack.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ module.exports = {
2424

2525
module: {
2626
loaders: [{
27-
test: /\.jsx?$/,
27+
test: /\.js$/,
2828
loader: 'babel-loader?stage=0',
29-
exclude: [
30-
'node_modules',
31-
],
29+
exclude: /node_modules/,
3230
}],
3331
},
3432
};

0 commit comments

Comments
 (0)