Skip to content
Snippets Groups Projects
Commit a0683ae3 authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix minification

parent b64f838d
No related merge requests found
......@@ -257,15 +257,15 @@ if (NODE_ENV !== "production") {
config.output.devtoolModuleFilenameTemplate = "[absolute-resource-path]";
config.output.pathinfo = true;
} else {
// this is required to ensure we don't minify Chevrotain token identifiers
// https://github.com/SAP/chevrotain/tree/master/examples/parser/minification
const tokens = allTokens.map(currTok => chevrotain.tokenName(currTok));
config.plugins.push(
new UglifyJSPlugin({
test: /\.jsx?($|\?)/i,
uglifyOptions: {
mangle: {
// this is required to ensure we don't minify Chevrotain token identifiers
// https://github.com/SAP/chevrotain/tree/master/examples/parser/minification
except: allTokens.map(function(currTok) {
return chevrotain.tokenName(currTok);
}),
reserved: tokens,
},
},
})
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment