Unverified Commit 618a7358 by Hadrien Croubois Committed by GitHub

Enable optimizations when publishing package (#2557)

parent 103ff8e2
......@@ -11,6 +11,7 @@ for (const f of fs.readdirSync(path.join(__dirname, 'hardhat'))) {
}
const enableGasReport = !!process.env.ENABLE_GAS_REPORT;
const enableProduction = process.env.COMPILE_MODE === 'production';
/**
* @type import('hardhat/config').HardhatUserConfig
......@@ -20,7 +21,7 @@ module.exports = {
version: '0.8.0',
settings: {
optimizer: {
enabled: enableGasReport,
enabled: enableGasReport || enableProduction,
runs: 200,
},
},
......
......@@ -22,7 +22,7 @@
"lint:js:fix": "eslint --ignore-path .gitignore . --fix",
"lint:sol": "echo 'solidity linter currently disabled' # solhint --max-warnings 0 \"contracts/**/*.sol\"",
"prepublish": "rimraf build contracts/build artifacts cache",
"prepare": "npm run compile",
"prepare": "env COMPILE_MODE=production npm run compile",
"prepack": "scripts/prepack.sh",
"release": "scripts/release/release.sh",
"version": "scripts/release/version.sh",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment