lg-cns-venture-3nd/webpack.server.config.js

55 lines
1.1 KiB
JavaScript
Raw Normal View History

2019-04-14 07:29:05 +00:00
// Work around for https://github.com/angular/angular-cli/issues/7200
const path = require('path');
const webpack = require('webpack');
const {
TsConfigPathsPlugin
} = require('awesome-typescript-loader');
module.exports = {
mode: 'none',
entry: {
server: [
'./src/server/main.ts',
]
},
target: 'node',
resolve: {
extensions: ['.ts', '.js', '.json'],
plugins: [
new TsConfigPathsPlugin({
configFileName: './src/tsconfig.server.json'
})
]
},
optimization: {
minimize: false
},
output: {
// Puts the output at the root of the dist folder
path: path.join(__dirname, 'dist', 'server'),
filename: '[name].js'
},
module: {
rules: [{
test: /\.json$/,
exclude: /node_modules/,
loader: 'json-loader'
},
{
test: /\.ts$/,
loader: 'awesome-typescript-loader',
options: {
configFileName: './src/tsconfig.server.json'
}
}
]
},
plugins: [
new webpack.DefinePlugin({
"global.GENTLY": false
}),
]
};