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