diff --git a/apps/vyper/tsconfig.json b/apps/vyper/tsconfig.json index a3e71f89f3..89dc063037 100644 --- a/apps/vyper/tsconfig.json +++ b/apps/vyper/tsconfig.json @@ -6,8 +6,8 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitReturns": true, + "strict": false, + "noImplicitReturns": false, "noFallthroughCasesInSwitch": true }, "files": [], diff --git a/apps/vyper/webpack.config.js b/apps/vyper/webpack.config.js new file mode 100644 index 0000000000..02143af15b --- /dev/null +++ b/apps/vyper/webpack.config.js @@ -0,0 +1,31 @@ +const nxWebpack = require('@nrwl/react/plugins/webpack') +const TerserPlugin = require('terser-webpack-plugin') + +module.exports = config => { + const nxWebpackConfig = nxWebpack(config) + const webpackConfig = { + ...nxWebpackConfig, + node: { + fs: 'empty', + tls: 'empty', + readline: 'empty', + net: 'empty', + module: 'empty', + 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 + } +} diff --git a/workspace.json b/workspace.json index 0e292d14ea..4fbdc876ae 100644 --- a/workspace.json +++ b/workspace.json @@ -1540,7 +1540,7 @@ "apps/vyper/src/styles.css" ], "scripts": [], - "webpackConfig": "@nrwl/react/plugins/webpack" + "webpackConfig": "apps/vyper/webpack.config.js" }, "configurations": { "production": {