-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
32 lines (31 loc) · 828 Bytes
/
webpack.config.js
File metadata and controls
32 lines (31 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const path = require("path");
module.exports = {
mode: "development",
entry: "./src/index.jsx",
output: {
path: path.join(__dirname, 'public'),
filename: "bundle.js"
},
// [module] will allow us to set any external modules we have added to webpack
module: {
// [rules] will determine the rules around those external modules
rules: [
// First rule is to idenify js and jsx files and turn on babel
{
test: /\.(jsx|js)$/,
exclude: /node_modules/,
loader: "babel-loader"
},
// Second rule is to check for css files and load them with the following loaders
{
test: /\.scss$/i,
use: [
"style-loader",
"css-loader",
"sass-loader"
],
}
]
},
resolve: { extensions: ['.js', '.jsx'] },
}