@plaudit/webpack-extensions 2.56.0 → 2.56.1
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.
|
@@ -134,7 +134,7 @@ class PlainEntrypointsConfigFileGeneratorPlugin {
|
|
|
134
134
|
finalHandleName = handleName;
|
|
135
135
|
}
|
|
136
136
|
else {
|
|
137
|
-
const basename = node_path_1.default.basename(src).replace(/_(?:script|style
|
|
137
|
+
const basename = node_path_1.default.basename(src).replace(/_(?:script(?:-\d+)?\.js|style(?:-\d+)?\.css)$|(?<!_(script|style))\.(js|css)$/, "");
|
|
138
138
|
const baseFinalHandleName = `${handlePrefix}.${kebabCase(basename)}`;
|
|
139
139
|
const handleNameMap = (isScript ? usedScriptHandleNames : usedStyleHandleNames);
|
|
140
140
|
finalHandleName = baseFinalHandleName;
|
|
@@ -268,10 +268,9 @@ function finalizeEntryDestination(entry, dynamicEffectiveDestinationsWithExpecte
|
|
|
268
268
|
if (entry[1].staticallyDeclaredDestination) {
|
|
269
269
|
return entry;
|
|
270
270
|
}
|
|
271
|
-
//TODO: Maybe try to figure out a way to avoid generated handles unnecessarily including "_script" and "_style"
|
|
272
271
|
const extension = node_path_1.default.extname(entry[1].destination);
|
|
273
272
|
const filename = dynamicEffectiveDestinationsWithExpectedNaiveDuplicates[entry[1].effectiveDestination]
|
|
274
|
-
? entry[1].effectiveDestination + (extension === '.css' ? "
|
|
273
|
+
? entry[1].effectiveDestination + (extension === '.css' ? "_style" : "_script")
|
|
275
274
|
: entry[1].effectiveDestination;
|
|
276
275
|
let count = 0, derivedDestination = filename + extension;
|
|
277
276
|
while (derivedDestination in allocatedDestinations && allocatedDestinations[derivedDestination] !== entry[0]) {
|
|
@@ -414,7 +413,6 @@ function commonConfigProcessingPrep(config, webpackConfig) {
|
|
|
414
413
|
updateCurrentVariables: (value) => currentVariables = value
|
|
415
414
|
};
|
|
416
415
|
}
|
|
417
|
-
//TODO: Implement path deduplication w/ the same code we use for block.json (only for plain v2 w/ specified handles
|
|
418
416
|
//TODO: Try using context to avoid needing to cobble dest paths together?
|
|
419
417
|
function processIndividualWebpackConfig(config, webpackConfig, sources) {
|
|
420
418
|
const commonConfig = commonConfigProcessingPrep(config, webpackConfig);
|