-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.common.js
37 lines (35 loc) · 1.02 KB
/
webpack.common.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
module.exports = {
entry: "./src/index.js",
module: {
rules: [
{
test: /\.html$/,
use: ["html-loader"]
}, {
test: /\.js/,
exclude: /(node_modules|bower_components)/,
use: [{
loader: 'babel-loader'
}]
},
//https://stackoverflow.com/questions/52704890/loading-fontawesome-via-webpack-fonts-do-not-load
//https://stackoverflow.com/questions/52219401/webpack-style-loader-css-loader-url-path-resolution-not-working
/* {
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'file-loader',
options: {
name: 'fonts/[name].[contentHash].[ext]',
outputPath: (url, resourcePath, context) => {
// `resourcePath` is original absolute path to asset
// `context` is directory where stored asset (`rootContext`) or `context` option
// To get relative path you can use
// const relativePath = path.relative(context, resourcePath);
return `./${url}`;
}
}
}]
} */
]
}
};