2020-04-20 13:36:55 +08:00
|
|
|
/** @type {import("../../../../").Configuration} */
|
2019-11-18 21:29:19 +08:00
|
|
|
module.exports = {
|
|
|
|
mode: "development",
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
2019-11-26 20:56:27 +08:00
|
|
|
test: /\.png$/,
|
|
|
|
type: "asset/inline",
|
2019-11-18 21:29:19 +08:00
|
|
|
generator: {
|
2019-11-26 20:56:27 +08:00
|
|
|
dataUrl: {
|
|
|
|
mimetype: "mimetype/png"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.jpg$/,
|
|
|
|
type: "asset/inline",
|
|
|
|
generator: {
|
|
|
|
dataUrl() {
|
|
|
|
return "data:image/jpg;base64,custom-content";
|
|
|
|
}
|
2019-11-18 21:29:19 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.svg$/,
|
|
|
|
type: "asset",
|
|
|
|
generator: {
|
2019-11-26 20:56:27 +08:00
|
|
|
dataUrl: {
|
|
|
|
encoding: false
|
2019-11-18 21:29:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
experiments: {
|
|
|
|
asset: true
|
|
|
|
}
|
|
|
|
};
|