2021-03-21 01:08:41 +00:00
|
|
|
const path = require("path")
|
|
|
|
|
2021-01-25 18:37:58 +00:00
|
|
|
module.exports = {
|
|
|
|
webpackConfig: {
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /[.]jsx?$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: "babel-loader"
|
|
|
|
},
|
|
|
|
{
|
2021-02-02 02:09:54 +00:00
|
|
|
test: /[.]module[.]css$/,
|
2021-01-25 18:37:58 +00:00
|
|
|
use: [
|
|
|
|
"style-loader",
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
|
|
|
options: {
|
|
|
|
importLoaders: 1,
|
|
|
|
modules: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2021-02-02 02:09:54 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /(?<![.]module)[.]css$/,
|
|
|
|
use: [
|
|
|
|
"style-loader",
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
|
|
|
options: {
|
|
|
|
importLoaders: 1,
|
|
|
|
modules: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /[.](?:ttf|woff|woff2)$/,
|
|
|
|
loader: "file-loader"
|
|
|
|
},
|
2021-01-25 18:37:58 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|