-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.loaders.js
61 lines (61 loc) · 1.48 KB
/
webpack.loaders.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
module.exports = path => [
{
test: /\.jsx?$/,
loader: "babel-loader",
include: path.resolve(__dirname, "resources/js/src"),
query: {
presets: ["@babel/env", "@babel/react"],
plugins: [
[
"@babel/plugin-transform-runtime",
{
corejs: false
}
]
]
}
},
{
test: /\.svg$/,
use: ["@svgr/webpack"]
},
{
test: /\.(s[ac]ss|css)$/i,
use: [
"style-loader",
"css-loader",
"postcss-loader",
{
loader: "sass-loader",
options: {
prependData: `@import 'styles/variables'; @import 'styles/mixins';`,
sassOptions: {
includePaths: [
path.resolve(__dirname, "resources/js/src/assets")
]
}
}
}
]
},
{
test: /\.(png|svg|jpg|gif|ico)$/,
use: {
loader: "file-loader",
options: {
name: "images/[name].[ext]"
}
}
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
use: [
{
loader: "file-loader",
options: {
name: "fonts/[name].[ext]"
}
}
]
}
];