Skip to content

Instantly share code, notes, and snippets.

@henriqueweiand
Created May 18, 2019 21:15
Show Gist options
  • Save henriqueweiand/06dec0d6cf077004725e94ff3b094361 to your computer and use it in GitHub Desktop.
Save henriqueweiand/06dec0d6cf077004725e94ff3b094361 to your computer and use it in GitHub Desktop.
const path = require('path');
module.exports = {
entry: path.join(__dirname, 'src', 'index.js'),
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
},
devServer: {
contentBase: path.join(__dirname, 'public'),
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: /\.scss$/,
use: [{
loader: 'style-loader',
}, {
loader: 'css-loader',
options: {
sourceMap: true,
},
}, {
loader: 'sass-loader',
options: {
sourceMap: true,
},
}],
},
],
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment