And prob may come across: https://stackoverflow.com/questions/44439930/how-after-building-the-dist-folder-in-webpack-move-the-bundle-js-and-css-file-i
/*
* Refer: @jantimon https://github.com/jantimon/html-webpack-plugin/issues/148
* Place javascript in a js folder
* Place css in a css folder
* Place html in the root folder
*/
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: './example.js',
output: {
path: __dirname + '/dist',
publicPath: '',
filename: 'js/bundle.js'
},
module: {
loaders: [
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
}
]
},
plugins: [
new HtmlWebpackPlugin(),
new ExtractTextPlugin('css/styles.css')
]
};