Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Commit a7e006e

Browse files
fix: correct asset naming when using a custom naming template
1 parent 3de01b4 commit a7e006e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,7 @@ class ClosureCompilerPlugin {
274274
} else {
275275
assetName = outputFile.path.replace(/^\.\//, '');
276276
if (!/\.js$/.test(chunk.files[0])) {
277-
assetName = outputFile.path.substr(
278-
0,
279-
outputFile.path.length - 3
280-
);
277+
assetName = assetName.substr(0, assetName.length - 3);
281278
}
282279
}
283280
const sourceMap = JSON.parse(outputFile.source_map);

0 commit comments

Comments
 (0)