var isDevBuild = process.argv.indexOf('--env.prod') < 0; var path = require('path'); var webpack = require('webpack'); var AureliaWebpackPlugin = require('aurelia-webpack-plugin'); module.exports = { resolve: { extensions: [ '.js', '.ts' ] }, devtool: isDevBuild ? 'inline-source-map' : null, entry: { 'app': 'aurelia-bootstrapper-webpack' }, // Note: The aurelia-webpack-plugin will add your app's modules to this bundle automatically output: { path: path.resolve('./wwwroot/dist'), publicPath: '/dist', filename: '[name].js' }, module: { loaders: [ { test: /\.ts$/, include: /ClientApp/, loader: 'ts', query: { silent: true } }, { test: /\.html$/, loader: 'html' }, { test: /\.css$/, loaders: [ 'style', 'css' ] }, { test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' } ] }, plugins: [ new webpack.DllReferencePlugin({ context: __dirname, manifest: require('./wwwroot/dist/vendor-manifest.json') }), new AureliaWebpackPlugin({ root: path.resolve('./'), src: path.resolve('./ClientApp'), baseUrl: '/' }) ].concat(isDevBuild ? [] : [ // Plugins that apply in production builds only new webpack.optimize.UglifyJsPlugin() ]) };