From ad27975c791b93e87ad18413a73425a79f32471d Mon Sep 17 00:00:00 2001 From: olekon Date: Sat, 2 Oct 2021 19:55:28 +0700 Subject: [PATCH] Add production webpack config --- .gitignore | 1 + package.json | 2 +- webpack.prod.js | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 webpack.prod.js diff --git a/.gitignore b/.gitignore index 69ac226..31cc41c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /tmp ~* *.zip +*.LICENSE.txt \ No newline at end of file diff --git a/package.json b/package.json index 29ec017..3479fd8 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "ganache": "call .\\src\\stubs\\smarts\\rung.cmd", "migrate": "cd src\\stubs\\smarts\\ && truffle migrate --reset", "devnode": "concurrently \"npm run ganache\" \"npm run migrate\"", - "build": "webpack --mode=production" + "build": "webpack --config webpack.prod.js" }, "dependencies": { "@ant-design/compatible": "^1.0.8", diff --git a/webpack.prod.js b/webpack.prod.js new file mode 100644 index 0000000..a8bc2d4 --- /dev/null +++ b/webpack.prod.js @@ -0,0 +1,10 @@ +const devConfig = require('./webpack.config'); + +module.exports = { + ...devConfig, + mode: 'production', + + performance: { + hints: false, + }, +};