Commit 4d877996 authored by ioedeveloper's avatar ioedeveloper Committed by yann300

Run production build if variable is set

parent f47357fc
......@@ -239,7 +239,7 @@ jobs:
- checkout
- run: npm install
- run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
- run: npm run build:production
- run:
name: Deploy
command: |
......@@ -268,7 +268,7 @@ jobs:
- setup_remote_docker
- run: npm install
- run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
- run: npm run build:production
- run: ./apps/remix-ide/ci/copy_resources.sh
- run: ./apps/remix-ide/ci/publishIpfs
- run: ./apps/remix-ide/ci/build_and_publish_docker_images.sh
......@@ -293,7 +293,7 @@ jobs:
- checkout
- run: npm install
- run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
- run: npm run build:production
- run:
name: Deploy
command: |
......@@ -322,7 +322,7 @@ jobs:
- run: npm install
- run: npm run build:libs
- run: npm run downloadsolc_assets
- run: npm run build
- run: npm run build:production
- run:
name: Deploy
command: |
......
......@@ -3,18 +3,8 @@ const TerserPlugin = require('terser-webpack-plugin')
module.exports = config => {
const nxWebpackConfig = nxWebpack(config)
const productionConfig = process.env.NODE_ENV === 'production' ? {
mode: 'production',
devtool: 'source-map',
optimization: {
minimize: true,
minimizer: [new TerserPlugin()]
}
} : {}
return {
const webpackConfig = {
...nxWebpackConfig,
...productionConfig,
node: {
fs: 'empty',
tls: 'empty',
......@@ -24,4 +14,18 @@ module.exports = config => {
child_process: 'empty'
}
}
if (process.env.NODE_ENV === 'production') {
return {
...webpackConfig,
mode: 'production',
devtool: 'source-map',
optimization: {
minimize: true,
minimizer: [new TerserPlugin()]
}
}
} else {
return webpackConfig
}
}
......@@ -3,18 +3,8 @@ const TerserPlugin = require('terser-webpack-plugin')
module.exports = config => {
const nxWebpackConfig = nxWebpack(config)
const productionConfig = process.env.NODE_ENV === 'production' ? {
mode: 'production',
devtool: 'source-map',
optimization: {
minimize: true,
minimizer: [new TerserPlugin()]
}
} : {}
return {
const webpackConfig = {
...nxWebpackConfig,
...productionConfig,
node: {
fs: 'empty',
tls: 'empty',
......@@ -24,4 +14,18 @@ module.exports = config => {
child_process: 'empty'
}
}
if (process.env.NODE_ENV === 'production') {
return {
...webpackConfig,
mode: 'production',
devtool: 'source-map',
optimization: {
minimize: true,
minimizer: [new TerserPlugin()]
}
}
} else {
return webpackConfig
}
}
......@@ -53,6 +53,7 @@
"downloadsolc_assets": "wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/remix-ide/src/assets/js/soljson.js",
"make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js",
"minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false",
"build:production": "NODE_ENV=production npx nx build remix-ide --with-deps",
"nightwatch_parallel": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox",
"nightwatch_local_firefox": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=firefox",
"nightwatch_local_chrome": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome",
......
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