add webpack

pull/3081/head
filip mertens 2 years ago
parent 5ceaef38d2
commit e8f79e05b8
  1. 4
      apps/vyper/tsconfig.json
  2. 31
      apps/vyper/webpack.config.js
  3. 2
      workspace.json

@ -6,8 +6,8 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"strict": false,
"noImplicitReturns": false,
"noFallthroughCasesInSwitch": true
},
"files": [],

@ -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
}
}

@ -1540,7 +1540,7 @@
"apps/vyper/src/styles.css"
],
"scripts": [],
"webpackConfig": "@nrwl/react/plugins/webpack"
"webpackConfig": "apps/vyper/webpack.config.js"
},
"configurations": {
"production": {

Loading…
Cancel
Save