Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require('path');
- const webpack = require('webpack');
- const helpers = require('./helpers');
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
- module.exports = {
- entry: {
- polyfills: './app/polyfills.ts',
- vendor: './app/vendor.ts',
- app: './app/boot.ts'
- },
- output: {
- path: helpers.root('dist/non-aot'),
- publicPath: '/',
- filename: '[name].bundle.js',
- chunkFilename: '[id].chunk.js'
- },
- resolve: {
- extensions: ['.ts', '.js']
- },
- module: {
- loaders: [
- {
- test: /\.ts$/,
- loaders: ['awesome-typescript-loader', 'angular2-template-loader']
- },
- {
- test: /\.html$/,
- loader: 'html-loader'
- }
- ]
- },
- plugins: [
- new webpack.optimize.CommonsChunkPlugin({
- name: ['app', 'vendor', 'polyfills']
- }),
- new HtmlWebpackPlugin({
- template: 'config/index.html'
- }),
- new webpack.DefinePlugin({
- 'process.env': {
- 'ENV': JSON.stringify(ENV)
- }
- })
- ]
- };
Add Comment
Please, Sign In to add comment