Created
March 18, 2020 04:34
-
-
Save frikky/a877aec1de13127d190803d05b2a0ff6 to your computer and use it in GitHub Desktop.
Basic webpack configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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