Skip to content

Instantly share code, notes, and snippets.

@epaillous
Created June 28, 2017 14:22
Show Gist options
  • Save epaillous/04468332acc795ff06db224b829c56e7 to your computer and use it in GitHub Desktop.
Save epaillous/04468332acc795ff06db224b829c56e7 to your computer and use it in GitHub Desktop.
var webpack = require('webpack');
var webpackMerge = require('webpack-merge');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var commonConfig = require('./webpack.common.js');
var helpers = require('./helpers');
var credentials = require('./credentials/local.json');
module.exports = webpackMerge(commonConfig, {
devtool: 'cheap-module-eval-source-map',
output: {
path: helpers.root('dist'),
publicPath: '/',
filename: '[name].js',
chunkFilename: '[id].chunk.js'
},
module: {
rules: [
{
test: /\.ts$/,
use: ['awesome-typescript-loader?silent=true', 'angular2-template-loader', 'angular-router-loader']
}
]
},
plugins: [
new ExtractTextPlugin('[name].css'),
new webpack.EnvironmentPlugin(credentials)
],
devServer: {
historyApiFallback: true,
stats: 'minimal'
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment