mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-17 06:46:05 +01:00
.
This commit is contained in:
32
webpack.server.config.js
Normal file
32
webpack.server.config.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const baseConfig = require('./webpack.base.config.js')
|
||||
const path = require('path')
|
||||
const { AngularWebpackPlugin } = require('@ngtools/webpack')
|
||||
|
||||
module.exports = {
|
||||
name: 'server',
|
||||
target: 'node',
|
||||
...baseConfig,
|
||||
entry: {
|
||||
'index.server': path.resolve(__dirname, 'src/index.server.ts'),
|
||||
'server': path.resolve(__dirname, 'src/server.ts'),
|
||||
},
|
||||
plugins: [
|
||||
...baseConfig.plugins,
|
||||
new AngularWebpackPlugin({
|
||||
entryModule: path.resolve(__dirname, 'src/app/app.server.module`#AppServerModule'),
|
||||
mainPath: path.resolve(__dirname, 'src/index.server.ts'),
|
||||
tsconfig: 'tsconfig.json',
|
||||
directTemplateLoading: false,
|
||||
platform: 1,
|
||||
skipCodeGeneration: false,
|
||||
}),
|
||||
],
|
||||
output: {
|
||||
libraryTarget: 'commonjs',
|
||||
path: path.join(__dirname, 'build-server'),
|
||||
pathinfo: true,
|
||||
publicPath: '/static/',
|
||||
filename: '[name].js',
|
||||
chunkFilename: '[name].bundle.js',
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user