Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = ({outputPath}) =>
webpack({
...serverConfig,
entry: path.join(__dirname, '..', 'server'),
output: {
...serverConfig.output,
path: outputPath,
chunkFilename: '[name].js',
filename: 'index.js'
},
externals: undefined,
resolve: {
...serverConfig.resolve,
modules: [
path.join(__dirname, '..', 'server'),
path.join(__dirname, '..', 'node_modules'),
path.join(process.cwd(), 'src'),
path.join(process.cwd(), 'node_modules'),
'node_modules'
]
}
})