Skip to content

Instantly share code, notes, and snippets.

@montmirail
Last active April 19, 2018 12:35
Show Gist options
  • Save montmirail/dad0cc8f1c61c58d6e9f832884663d3a to your computer and use it in GitHub Desktop.
Save montmirail/dad0cc8f1c61c58d6e9f832884663d3a to your computer and use it in GitHub Desktop.
const path = require('path');
const DashboardPlugin = require('webpack-dashboard/plugin');
module.exports = {
mode: 'development',
entry: './src/app.js',
output: {
path: path.join(__dirname, 'public', 'dist'),
filename: 'bundle.js'
},
module: {
rules:[
{
test: /\.js$/,
exclude: /node_modules/,
use: [
'babel-loader',
'eslint-loader'
]
},
{
test: /\.s?css$/,
use: [
'style-loader',
'css-loader',
'sass-loader'
]
}
]
},
plugins: [
new DashboardPlugin()
],
devtool: 'cheap-module-eval-source-map',
devServer: {
contentBase: path.join(__dirname, 'public'),
historyApiFallback: true,
port: 3030,
index: 'index.html',
publicPath: '/dist/'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment