mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
parent
b22d97ea3a
commit
821676511b
@ -182,9 +182,9 @@ export default class WebpackClientConfig extends WebpackBaseConfig {
|
|||||||
`${querystring.stringify(hotMiddlewareClientOptions)}&path=${clientPath}`.replace(/\/\//g, '/')
|
`${querystring.stringify(hotMiddlewareClientOptions)}&path=${clientPath}`.replace(/\/\//g, '/')
|
||||||
|
|
||||||
// Entry points
|
// Entry points
|
||||||
config.entry = {
|
config.entry = Object.assign({}, config.entry, {
|
||||||
app: [path.resolve(buildDir, 'client.js')]
|
app: [path.resolve(buildDir, 'client.js')]
|
||||||
}
|
})
|
||||||
|
|
||||||
// Add HMR support
|
// Add HMR support
|
||||||
if (this.dev) {
|
if (this.dev) {
|
||||||
|
@ -69,9 +69,9 @@ export default class WebpackServerConfig extends WebpackBaseConfig {
|
|||||||
Object.assign(config, {
|
Object.assign(config, {
|
||||||
target: 'node',
|
target: 'node',
|
||||||
node: false,
|
node: false,
|
||||||
entry: {
|
entry: Object.assign({}, config.entry, {
|
||||||
app: [path.resolve(this.buildContext.options.buildDir, 'server.js')]
|
app: [path.resolve(this.buildContext.options.buildDir, 'server.js')]
|
||||||
},
|
}),
|
||||||
output: Object.assign({}, config.output, {
|
output: Object.assign({}, config.output, {
|
||||||
filename: 'server.js',
|
filename: 'server.js',
|
||||||
libraryTarget: 'commonjs2'
|
libraryTarget: 'commonjs2'
|
||||||
|
Loading…
Reference in New Issue
Block a user