Omtimize playground load time

This commit is contained in:
Paulo Gustavo Veiga 2022-01-05 18:02:55 -08:00
parent 60ee365171
commit 80ba74b981
3 changed files with 2 additions and 9 deletions

View File

@ -9,9 +9,6 @@ module.exports = {
type: 'umd',
},
},
optimization: {
usedExports: true,
},
entry: {
mindplot: './src/index.js',
loader: './src/indexLoader.js',

View File

@ -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'),

View File

@ -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);