mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-24 23:37:57 +01:00
Omtimize playground load time
This commit is contained in:
parent
60ee365171
commit
80ba74b981
@ -9,9 +9,6 @@ module.exports = {
|
|||||||
type: 'umd',
|
type: 'umd',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
optimization: {
|
|
||||||
usedExports: true,
|
|
||||||
},
|
|
||||||
entry: {
|
entry: {
|
||||||
mindplot: './src/index.js',
|
mindplot: './src/index.js',
|
||||||
loader: './src/indexLoader.js',
|
loader: './src/indexLoader.js',
|
||||||
|
@ -6,6 +6,7 @@ const common = require('./webpack.common');
|
|||||||
const { merge } = require('webpack-merge');
|
const { merge } = require('webpack-merge');
|
||||||
|
|
||||||
const playgroundConfig = {
|
const playgroundConfig = {
|
||||||
|
mode: 'development',
|
||||||
entry: {
|
entry: {
|
||||||
layout: path.resolve(__dirname, './test/playground/layout/context-loader'),
|
layout: path.resolve(__dirname, './test/playground/layout/context-loader'),
|
||||||
viewmode: path.resolve(__dirname, './test/playground/map-render/js/viewmode'),
|
viewmode: path.resolve(__dirname, './test/playground/map-render/js/viewmode'),
|
||||||
|
@ -1,16 +1,11 @@
|
|||||||
const { merge } = require('webpack-merge');
|
const { merge } = require('webpack-merge');
|
||||||
const CompressionPlugin = require('compression-webpack-plugin');
|
|
||||||
const common = require('./webpack.common');
|
const common = require('./webpack.common');
|
||||||
|
|
||||||
const prodConfig = {
|
const prodConfig = {
|
||||||
optimization: {
|
optimization: {
|
||||||
|
usedExports: true,
|
||||||
minimize: true,
|
minimize: true,
|
||||||
},
|
},
|
||||||
plugins: [
|
|
||||||
new CompressionPlugin({
|
|
||||||
test: /\.js(\?.*)?$/i,
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = merge(common, prodConfig);
|
module.exports = merge(common, prodConfig);
|
||||||
|
Loading…
Reference in New Issue
Block a user