Skip to content

Instantly share code, notes, and snippets.

@shaddyshad
Last active April 7, 2018 20:37
Show Gist options
  • Save shaddyshad/8c2abef042c5dc10dd0e5ecf8ae343ef to your computer and use it in GitHub Desktop.
Save shaddyshad/8c2abef042c5dc10dd0e5ecf8ae343ef to your computer and use it in GitHub Desktop.
Webpack configurations
const path = require('path');
module.exports = {
entry: './index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
mode: 'development',
devServer: {
contentBase: path.join(__dirname, 'dist'),
port: 8080
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
loader: "babel-loader",
exclude: /node_modules/,
},
{
test: /\.css$/,
use: [
{loader: 'css-loader'},
{loader: 'style-loader'}
]
}
]
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment