|
@@ -125,6 +125,7 @@ module.exports = (options) => {
|
|
|
|
|
|
|
|
// ignore
|
|
// ignore
|
|
|
new webpack.IgnorePlugin(/^\.\/lib\/deflate\.js/, /markdown-it-plantuml/),
|
|
new webpack.IgnorePlugin(/^\.\/lib\/deflate\.js/, /markdown-it-plantuml/),
|
|
|
|
|
+ new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
|
|
|
|
|
|
|
new LodashModuleReplacementPlugin({
|
|
new LodashModuleReplacementPlugin({
|
|
|
flattening: true,
|
|
flattening: true,
|
|
@@ -155,7 +156,7 @@ module.exports = (options) => {
|
|
|
enforce: true,
|
|
enforce: true,
|
|
|
},
|
|
},
|
|
|
commons: {
|
|
commons: {
|
|
|
- test: /src[\\/].*\.jsx?$/,
|
|
|
|
|
|
|
+ test: /(src|resource)[\\/].*\.(js|jsx|json)$/,
|
|
|
chunks: 'initial',
|
|
chunks: 'initial',
|
|
|
name: 'js/commons',
|
|
name: 'js/commons',
|
|
|
minChunks: 2,
|
|
minChunks: 2,
|
|
@@ -163,7 +164,7 @@ module.exports = (options) => {
|
|
|
priority: 20,
|
|
priority: 20,
|
|
|
},
|
|
},
|
|
|
vendors: {
|
|
vendors: {
|
|
|
- test: /node_modules[\\/].*\.jsx?$/,
|
|
|
|
|
|
|
+ test: /node_modules[\\/].*\.(js|jsx|json)$/,
|
|
|
chunks: (chunk) => {
|
|
chunks: (chunk) => {
|
|
|
// ignore patterns
|
|
// ignore patterns
|
|
|
return chunk.name != null && !chunk.name.match(/legacy-presentation|ie11-polyfill|hackmd-/);
|
|
return chunk.name != null && !chunk.name.match(/legacy-presentation|ie11-polyfill|hackmd-/);
|