36 lines
986 B
JavaScript
36 lines
986 B
JavaScript
const { NxAppRspackPlugin } = require('@nx/rspack/app-plugin')
|
|
const { NxReactRspackPlugin } = require('@nx/rspack/react-plugin')
|
|
const { join } = require('path')
|
|
|
|
module.exports = {
|
|
output: {
|
|
path: join(__dirname, 'dist'),
|
|
},
|
|
devServer: {
|
|
port: 4201,
|
|
open: true,
|
|
historyApiFallback: {
|
|
index: '/index.html',
|
|
disableDotRule: true,
|
|
htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'],
|
|
},
|
|
},
|
|
plugins: [
|
|
new NxAppRspackPlugin({
|
|
tsConfig: './tsconfig.app.json',
|
|
main: './src/main.tsx',
|
|
index: './src/index.html',
|
|
baseHref: '/',
|
|
assets: ['./src/assets'],
|
|
styles: ['./src/styles.css'],
|
|
outputHashing: process.env['NODE_ENV'] === 'production' ? 'all' : 'none',
|
|
optimization: process.env['NODE_ENV'] === 'production',
|
|
}),
|
|
new NxReactRspackPlugin({
|
|
// Uncomment this line if you don't want to use SVGR
|
|
// See: https://react-svgr.com/
|
|
// svgr: false
|
|
}),
|
|
],
|
|
}
|