@plaudit/webpack-extensions 2.22.0 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -171,6 +171,10 @@ function injectPostcssConfigOverrides(webpackConfig, variables, verbose) {
|
|
|
171
171
|
rule.test = /\.m?[jt]sx?$/; // This hacks in support for mjs and mts files
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
+
if (rule.type === "asset/inline" && rule.test instanceof RegExp && rule.issuer instanceof RegExp && rule.test.test("test.svg") && rule.issuer.test("test.pcss")) {
|
|
175
|
+
rule.type = "asset/resource";
|
|
176
|
+
rule.generator = { filename: "images/[name].[hash:8][ext]" };
|
|
177
|
+
}
|
|
174
178
|
if (typeof rule.generator === 'object') {
|
|
175
179
|
const ruleGeneratorFilename = rule.generator["filename"];
|
|
176
180
|
if (typeof ruleGeneratorFilename === 'string' && (ruleGeneratorFilename.startsWith("images/") || ruleGeneratorFilename.startsWith("fonts/"))) {
|