Created
February 19, 2018 05:11
-
-
Save nullbio/91677604b7d901ea7f9e97f642028206 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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