Skip to content

Instantly share code, notes, and snippets.

@frikky
Created March 18, 2020 04:34
Show Gist options
  • Save frikky/a877aec1de13127d190803d05b2a0ff6 to your computer and use it in GitHub Desktop.
Save frikky/a877aec1de13127d190803d05b2a0ff6 to your computer and use it in GitHub Desktop.
Basic webpack configuration
# Minimal webpack.config.js
module.exports = {
mode: "production",
entry: {
"app": "./src/index.js",
},
module: {
rules: [
{
test: /\.css$/,
use: ["style-loader", "css-loader"],
exclude: /node_modules/,
},
{
test: /\.js$/,
loader: "babel-loader",
exclude: /node_modules/,
}
],
},
output: {
path: __dirname+"/build",
filename: "bundle.js",
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment