-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
37 lines (34 loc) · 991 Bytes
/
webpack.config.js
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
33
34
35
36
37
const path = require('path');
module.exports = {
mode: "production",
entry: {
app: "./src/js/index.js",
produit: "./src/js/produit.js",
validation: "./src/js/validation.js",
confirmation: "./src/js/confirmation.js"
},
output: {
filename: "[name].bundle.js",
path: path.resolve(__dirname, "dist")
},
module:{
rules: [
{ test: /\.s[ac]ss$/i,
use: [
// Creates `style` nodes from JS strings
"style-loader",
// Translates CSS into CommonJS
"css-loader",
// Compiles Sass to CSS
"sass-loader",
],
},
{
test: /\.(jpg|jpeg|png|ttf|eot|svg|gif)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
use: [{
loader: 'file-loader'
}]
}
]
}
}