mirror of https://github.com/webpack/webpack.git
39 lines
567 B
JavaScript
39 lines
567 B
JavaScript
/** @type {import("../../../../").Configuration} */
|
|
module.exports = {
|
|
mode: "development",
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.png$/,
|
|
type: "asset/inline",
|
|
generator: {
|
|
dataUrl: {
|
|
mimetype: "mimetype/png"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.jpg$/,
|
|
type: "asset/inline",
|
|
generator: {
|
|
dataUrl() {
|
|
return "data:image/jpg;base64,custom-content";
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.svg$/,
|
|
type: "asset",
|
|
generator: {
|
|
dataUrl: {
|
|
encoding: false
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
experiments: {
|
|
asset: true
|
|
}
|
|
};
|