UNPKG

@ubiquits/toolchain

Version:

Toolchain for ubiquits projects, modules & core

35 lines (29 loc) 908 B
const webpack = require('webpack'); const webpackMerge = require('webpack-merge'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const commonConfig = require('./webpack.common.js'); const helpers = require('./helpers'); const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; module.exports = webpackMerge(commonConfig, { // devtool: 'source-map', output: { // path: helpers.root('..', 'lib', 'browser'), publicPath: '/', filename: '[name].[hash].js', chunkFilename: '[id].[hash].chunk.js' }, htmlLoader: { minimize: false // workaround for ng2 }, plugins: [ new webpack.NoErrorsPlugin(), new webpack.optimize.DedupePlugin(), // new webpack.optimize.UglifyJsPlugin(), new ExtractTextPlugin('[name].[hash].css'), new webpack.DefinePlugin({ 'process.env': { 'ENV': JSON.stringify(ENV) } }) ] });