Skip to content

Instantly share code, notes, and snippets.

@henriqueweiand
Last active June 27, 2019 19:51
Show Gist options
  • Save henriqueweiand/e341db32bf33115014a6b7aae853e3ca to your computer and use it in GitHub Desktop.
Save henriqueweiand/e341db32bf33115014a6b7aae853e3ca 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|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: /\.(sa|sc|c)ss$/,
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