mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Switch to Terser
This commit is contained in:
parent
b4c996e9f9
commit
312f0ed559
4 changed files with 355 additions and 606 deletions
|
|
@ -14,32 +14,5 @@
|
|||
"@babel/proposal-class-properties",
|
||||
"@babel/proposal-object-rest-spread",
|
||||
"@babel/plugin-proposal-optional-chaining"
|
||||
],
|
||||
"env": {
|
||||
"production": {
|
||||
"plugins": [
|
||||
"minify-constant-folding",
|
||||
"minify-dead-code-elimination",
|
||||
"minify-flip-comparisons",
|
||||
"minify-guarded-expressions",
|
||||
"minify-infinity",
|
||||
[
|
||||
"minify-mangle-names",
|
||||
{
|
||||
"keepClassName": true,
|
||||
"keepFnName": true
|
||||
}
|
||||
],
|
||||
"minify-replace",
|
||||
"minify-simplify",
|
||||
"minify-type-constructors",
|
||||
"transform-member-expression-literals",
|
||||
"transform-merge-sibling-variables",
|
||||
"transform-minify-booleans",
|
||||
"transform-property-literals",
|
||||
"transform-simplify-comparison-operators",
|
||||
"transform-undefined-to-void"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
27
package.json
27
package.json
|
|
@ -60,13 +60,13 @@
|
|||
"devDependencies": {
|
||||
"@ava/babel": "1.0.0",
|
||||
"@babel/cli": "7.8.3",
|
||||
"@babel/core": "7.7.7",
|
||||
"@babel/plugin-proposal-class-properties": "^7.8.0",
|
||||
"@babel/plugin-proposal-numeric-separator": "^7.8.0",
|
||||
"@babel/core": "7.8.3",
|
||||
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
||||
"@babel/plugin-proposal-numeric-separator": "^7.8.3",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
|
||||
"@babel/plugin-proposal-optional-chaining": "7.8.0",
|
||||
"@babel/plugin-proposal-optional-chaining": "7.8.3",
|
||||
"@babel/preset-react": "7.8.3",
|
||||
"@babel/preset-typescript": "7.8.0",
|
||||
"@babel/preset-typescript": "7.8.3",
|
||||
"@types/args": "3.0.0",
|
||||
"@types/async-retry": "1.4.1",
|
||||
"@types/color": "3.0.1",
|
||||
|
|
@ -81,31 +81,30 @@
|
|||
"@types/plist": "3.0.2",
|
||||
"@types/react": "^16.9.17",
|
||||
"@types/react-dom": "^16.9.4",
|
||||
"@types/react-redux": "^7.1.5",
|
||||
"@types/react-redux": "^7.1.6",
|
||||
"@types/seamless-immutable": "7.1.11",
|
||||
"@types/styled-jsx": "2.2.8",
|
||||
"@types/uuid": "3.4.6",
|
||||
"@types/webdriverio": "^4.8.0",
|
||||
"@types/winreg": "1.2.30",
|
||||
"@typescript-eslint/eslint-plugin": "2.15.0",
|
||||
"@typescript-eslint/parser": "2.15.0",
|
||||
"@typescript-eslint/eslint-plugin": "2.17.0",
|
||||
"@typescript-eslint/parser": "2.17.0",
|
||||
"ava": "3.0.0",
|
||||
"babel-loader": "8.0.6",
|
||||
"babel-preset-minify": "0.5.1",
|
||||
"concurrently": "5.0.2",
|
||||
"copy-webpack-plugin": "5.1.1",
|
||||
"cpy-cli": "^2.0.0",
|
||||
"cross-env": "6.0.3",
|
||||
"electron": "^7.1.9",
|
||||
"electron-builder": "22.2.0",
|
||||
"electron-builder-squirrel-windows": "22.2.0",
|
||||
"electron-builder-squirrel-windows": "22.3.0",
|
||||
"electron-devtools-installer": "2.2.4",
|
||||
"electron-rebuild": "1.8.8",
|
||||
"eslint": "6.8.0",
|
||||
"eslint-config-prettier": "6.9.0",
|
||||
"eslint-plugin-prettier": "3.1.2",
|
||||
"eslint-plugin-react": "7.17.0",
|
||||
"husky": "4.0.7",
|
||||
"eslint-plugin-react": "7.18.0",
|
||||
"husky": "4.0.10",
|
||||
"inquirer": "7.0.3",
|
||||
"node-gyp": "6.1.0",
|
||||
"null-loader": "3.0.0",
|
||||
|
|
@ -114,7 +113,9 @@
|
|||
"proxyquire": "2.1.3",
|
||||
"redux-devtools-extension": "2.13.8",
|
||||
"spectron": "9.0.0",
|
||||
"style-loader": "1.1.2",
|
||||
"style-loader": "1.1.3",
|
||||
"terser": "4.6.3",
|
||||
"terser-webpack-plugin": "2.3.2",
|
||||
"ts-node": "8.6.2",
|
||||
"typescript": "3.7.5",
|
||||
"webpack": "4.41.5"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ const path = require('path');
|
|||
|
||||
const webpack = require('webpack');
|
||||
const Copy = require('copy-webpack-plugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
const nodeEnv = process.env.NODE_ENV || 'development';
|
||||
const isProd = nodeEnv === 'production';
|
||||
|
|
@ -53,6 +54,10 @@ module.exports = [
|
|||
}
|
||||
])
|
||||
],
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [new TerserPlugin()]
|
||||
},
|
||||
target: 'electron-main'
|
||||
},
|
||||
|
||||
|
|
@ -101,6 +106,10 @@ module.exports = [
|
|||
}
|
||||
])
|
||||
],
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [new TerserPlugin()]
|
||||
},
|
||||
target: 'electron-renderer'
|
||||
},
|
||||
{
|
||||
|
|
@ -136,6 +145,10 @@ module.exports = [
|
|||
'process.env.NODE_ENV': JSON.stringify(nodeEnv)
|
||||
})
|
||||
],
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [new TerserPlugin()]
|
||||
},
|
||||
target: 'node'
|
||||
}
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in a new issue