Remove default uglify (-p) in webpack. Fix wrong template compression for IE11

pull/13640/head
Jesús Arroyo Torrens 7 years ago
parent c2f4e8ffa0
commit a04fac7b07

@ -145,6 +145,7 @@ ion for time-series (#12670)
* Hide legend title and header if not enabled (https://github.com/CartoDB/support/issues/1349)
### Bug fixes / enhancements
* Fixed bubble legends in IE11 (https://github.com/CartoDB/cartodb/issues/13635)
* Fix table head style in IE11 (https://github.com/CartoDB/cartodb/issues/13606)
* Freeze required Google Maps script to v3.30 (https://github.com/CartoDB/cartodb/pull/13562)
* Add `shield-placement-keyword` CartoCSS property (#13612)

@ -166,10 +166,10 @@
"update-internal-deps": "rm -rf node_modules && npm install --production --no-optional --no-shrinkwrap && npm dedupe && npm prune && npm shrinkwrap && npm run fix-shrinkwrap-protocol && npm install",
"branch-files": "node lib/build/branchFiles/branchFiles.js",
"affected_specs": "node lib/build/branchFiles/branchFiles.js | xargs node lib/build/affectedFiles/affectedFiles.js",
"build": "NODE_ENV='production' webpack -p --config webpack/builder/webpack.prod.config.js",
"build:dashboard": "NODE_ENV='production' webpack -p --config webpack/dashboard/webpack.prod.config.js",
"build:static": "NODE_ENV='production' webpack -p --progress --config webpack/webpack.prod.config.js",
"carto-node": "NODE_ENV=production webpack -p --config webpack/carto-node/webpack.config.js",
"build": "NODE_ENV='production' webpack --progress --config webpack/builder/webpack.prod.config.js",
"build:dashboard": "NODE_ENV='production' webpack --progress --config webpack/dashboard/webpack.prod.config.js",
"build:static": "NODE_ENV='production' webpack --progress --config webpack/webpack.prod.config.js",
"carto-node": "NODE_ENV=production webpack --progress --config webpack/carto-node/webpack.config.js",
"build:stats": "webpack --env.stats --progress --config webpack.dev.config.js",
"start": "grunt watch:css & webpack --progress --watch --config webpack/builder/webpack.dev.config.js",
"dashboard": "grunt watch:css & webpack --progress --watch --config webpack/dashboard/webpack.dev.config.js",

@ -1,3 +1,8 @@
// NOTE: this configuration file MUST NOT be loaded with `-p` or `--optimize-minimize` option.
// This option includes an implicit call to UglifyJsPlugin and LoaderOptionsPlugin. Instead,
// an explicit call is made in this file to this plugins with customized options that enables
// more control of the output bundle in order to fix unexpected behavior in old browsers.
const webpack = require('webpack');
const {resolve} = require('path');
const PACKAGE = require('../../package.json');
@ -33,7 +38,11 @@ module.exports = env => {
minChunks: isVendor
}))
.concat([
// Extract common chuncks from the 3 vendor files
new webpack.LoaderOptionsPlugin({
minimize: true
}),
// Extract common chuncks from the 3 vendor files
new webpack.optimize.CommonsChunkPlugin({
name: 'common',
chunks: Object.keys(entryPoints).map(n => `${n}_vendor`),

@ -1,3 +1,8 @@
// NOTE: this configuration file MUST NOT be loaded with `-p` or `--optimize-minimize` option.
// This option includes an implicit call to UglifyJsPlugin and LoaderOptionsPlugin. Instead,
// an explicit call is made in this file to this plugins with customized options that enables
// more control of the output bundle in order to fix unexpected behavior in old browsers.
const webpack = require('webpack');
const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
const path = require('path');

@ -1,3 +1,8 @@
// NOTE: this configuration file MUST NOT be loaded with `-p` or `--optimize-minimize` option.
// This option includes an implicit call to UglifyJsPlugin and LoaderOptionsPlugin. Instead,
// an explicit call is made in this file to this plugins with customized options that enables
// more control of the output bundle in order to fix unexpected behavior in old browsers.
const webpack = require('webpack');
const {resolve} = require('path');
const PACKAGE = require('../../package.json');
@ -32,7 +37,11 @@ module.exports = env => {
minChunks: isVendor
}))
.concat([
// Extract common chuncks from the 3 vendor files
new webpack.LoaderOptionsPlugin({
minimize: true
}),
// Extract common chuncks from the 3 vendor files
new webpack.optimize.CommonsChunkPlugin({
name: 'common_dashboard',
chunks: Object.keys(entryPoints).map(n => `${n}_vendor`),

Loading…
Cancel
Save