angular-cn/public/docs/_examples/universal/ts/webpack.config.aot.js
Ward Bell 5738c4b66a docs(universal): add guide (#3378)
* docs(universal): add guide

* gulpfile: Replace 'rm -rf' with 'node rimraf' so install-example-angular will work on Windows

* Get universal working

* doc wip

* gulpfile: Add platform-server to install-example-angular

* Update toh code in universal sample - remove moduleId

* Update typescript to 2.2.1 when we install-example-angular --build

* move example files; add graphs

* demo and docs wip

* doc wip

* Fix toc

* add toc, link
2017-03-31 17:20:59 +01:00

31 lines
624 B
JavaScript

const ngtools = require('@ngtools/webpack');
const webpack = require('webpack');
module.exports = {
devtool: 'source-map',
entry: {
main: './src/main-aot.ts'
},
resolve: {
extensions: ['.ts', '.js']
},
target: 'node',
output: {
path: 'src/dist',
filename: 'build.js'
},
plugins: [
new ngtools.AotPlugin({
tsConfigPath: './tsconfig-aot.json'
}),
new webpack.optimize.UglifyJsPlugin({ sourceMap: true })
],
module: {
rules: [
{ test: /\.css$/, loader: 'raw-loader' },
{ test: /\.html$/, loader: 'raw-loader' },
{ test: /\.ts$/, loader: '@ngtools/webpack' }
]
}
}