-
-
Save marekhrabe/4a412d232d6c9f2a25d594d2a83e6ba1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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