55 lines
1.1 KiB
JavaScript
Executable File
55 lines
1.1 KiB
JavaScript
Executable File
// 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
|
|
}),
|
|
]
|
|
};
|