mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-12 01:01:32 -04:00
Edit build for inline to avoid Safari unicode regex error
This commit is contained in:
parent
20ea050728
commit
0a6d0d1352
4 changed files with 293 additions and 105 deletions
19
Gruntfile.js
19
Gruntfile.js
|
@ -6,6 +6,7 @@ const NodeExternals = require("webpack-node-externals");
|
|||
const Inliner = require("web-resource-inliner");
|
||||
const glob = require("glob");
|
||||
const path = require("path");
|
||||
const UglifyJSWebpackPlugin = require("uglifyjs-webpack-plugin");
|
||||
|
||||
/**
|
||||
* Grunt configuration for building the app in various formats.
|
||||
|
@ -219,6 +220,24 @@ module.exports = function (grunt) {
|
|||
filename: "scripts.js",
|
||||
path: __dirname + "/build/prod"
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [
|
||||
/**
|
||||
* Override default uglifyJS plugin to escape
|
||||
* unicode chars in string and literals, avoiding
|
||||
* error with Safari.
|
||||
*/
|
||||
new UglifyJSWebpackPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
uglifyOptions: {
|
||||
output: {
|
||||
"ascii_only": true,
|
||||
}
|
||||
}
|
||||
})
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin(Object.assign({}, BUILD_CONSTANTS, {
|
||||
INLINE: "true"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue