Skip to content

Commit a78d3c1

Browse files
committed
fix(build): Apply bundle fix to legacy build
The Webpack config for the modern build was adjusted recently to add a loader, which is used as a workaround for a bug introduced by a recent dependency update. The legacy config needed the same update. The Webpack config was also updated in superficial ways to follow recommendations made for migrating from Webpack v1 to v2 (e.g. using `module.rules` instead of `module.loaders`). These changes should have no functional impact, and should make migrating to future versions of Webpack easier. fix #6269
1 parent 01f9adc commit a78d3c1

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

scripts/build-webpack.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ const compiler = webpack({
2828
'packages/lockfile/index.js': path.join(basedir, 'src/lockfile/index.js'),
2929
},
3030
module: {
31-
loaders: [
31+
rules: [
3232
{
3333
test: /\.js$/,
3434
exclude: /node_modules/,
35-
loader: 'babel-loader',
35+
use: 'babel-loader',
3636
},
3737
{
3838
test: /rx\.lite\.aggregates\.js/,
@@ -70,12 +70,20 @@ const compilerLegacy = webpack({
7070
// devtool: 'inline-source-map',
7171
entry: path.join(basedir, 'src/cli/index.js'),
7272
module: {
73-
loaders: [
73+
rules: [
7474
{
7575
test: /\.js$/,
7676
exclude: /node_modules/,
77-
loader: 'babel-loader',
78-
query: babelRc.env['pre-node5'],
77+
use: [
78+
{
79+
loader:'babel-loader',
80+
options: babelRc.env['pre-node5'],
81+
}
82+
],
83+
},
84+
{
85+
test: /rx\.lite\.aggregates\.js/,
86+
use: 'imports-loader?define=>false'
7987
},
8088
],
8189
},

0 commit comments

Comments
 (0)