Skip to content

Instantly share code, notes, and snippets.

@marekhrabe
Created March 10, 2017 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marekhrabe/4a412d232d6c9f2a25d594d2a83e6ba1 to your computer and use it in GitHub Desktop.
Save marekhrabe/4a412d232d6c9f2a25d594d2a83e6ba1 to your computer and use it in GitHub Desktop.
import webpack from 'webpack';
import path from 'path';
import productionConfig from './webpack.config.production';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
const config = {
...productionConfig,
target: 'web',
devtool: 'cheap-module-source-map',
output: {
...productionConfig.output,
path: path.join(__dirname, 'release-web'),
libraryTarget: 'var',
publicPath: null,
filename: '[hash].js',
},
node: {
...productionConfig.node,
fs: 'empty',
child_process: 'empty',
module: 'empty',
electron: 'empty',
net: 'empty',
dns: 'empty',
tls: 'empty',
},
plugins: [
...productionConfig.plugins.filter(plugin => !ExtractTextPlugin.prototype.isPrototypeOf(plugin)),
new HtmlWebpackPlugin({
title: 'Mockuuups Studio',
template: './app/template.html',
}),
new ExtractTextPlugin('[hash].css', { allChunks: true }),
],
};
export default config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment