Skip to content

Instantly share code, notes, and snippets.

@nullbio
Created February 19, 2018 05:11
Show Gist options
  • Select an option

  • Save nullbio/91677604b7d901ea7f9e97f642028206 to your computer and use it in GitHub Desktop.

Select an option

Save nullbio/91677604b7d901ea7f9e97f642028206 to your computer and use it in GitHub Desktop.
const common = require('./webpack.common.js');
const path = require('path');
const merge = require('webpack-merge');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = merge(common, {
devtool: 'inline-source-map',
devServer: {
contentBase: './dist'
},
module: {
loaders: [
{
test: /\.scss$/,
use: [
{loader: 'style-loader'},
{loader: 'css-loader'},
{loader: 'sass-loader'}
]
}
]
},
plugins: [
new CleanWebpackPlugin(['dist']),
new HtmlWebpackPlugin({
template: './src/index.html',
favicon: './src/favicon.ico',
inject: 'body'
}),
],
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name]-bundle.js'
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment