Skip to content

Commit 67399dc

Browse files
committed
fix: disable react-loadable plugin in production server compilation
1 parent 7c07127 commit 67399dc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

webpack/base.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ const extractTextPlugin = new ExtractTextPlugin({
2020
});
2121
const plugins = [
2222
isoPlugin,
23+
new ReactLoadablePlugin({
24+
filename: path.join(__dirname, '..', 'react-loadable.json')
25+
}),
2326
extractTextPlugin,
2427
new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en|es/),
2528
new webpack.DefinePlugin({
2629
'process.env': config.clientEnv
27-
}),
28-
new ReactLoadablePlugin({
29-
filename: path.join(__dirname, '..', 'react-loadable.json')
3030
})
3131
];
3232

webpack/production.server.babel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { babel } from '../package.json';
1111
const babelOpts = set(babel, 'presets[0][1].targets.uglify', true);
1212

1313
const plugins = [
14-
// we don't need the isomorphic plugin here
15-
...baseConfig.plugins.slice(1),
14+
// we don't need the isomorphic or react-loadable plugins here
15+
...baseConfig.plugins.slice(2),
1616
new UglifyJSPlugin({
1717
sourceMap: true
1818
}),

0 commit comments

Comments
 (0)