mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-24 01:19:58 +00:00
24 lines
477 B
TypeScript
24 lines
477 B
TypeScript
import { WebpackConfigContext } from '../utils/config'
|
|
|
|
export function node (ctx: WebpackConfigContext) {
|
|
const { config } = ctx
|
|
|
|
config.target = 'node'
|
|
config.node = false
|
|
|
|
config.resolve.mainFields = ['main', 'module']
|
|
|
|
config.output = {
|
|
...config.output,
|
|
chunkFilename: '[name].js',
|
|
libraryTarget: 'commonjs2'
|
|
}
|
|
|
|
config.performance = {
|
|
...config.performance,
|
|
hints: false,
|
|
maxEntrypointSize: Infinity,
|
|
maxAssetSize: Infinity
|
|
}
|
|
}
|