We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2479d8c commit f7b2c14Copy full SHA for f7b2c14
webpack/set-webpack-public-path-plugin/src/SetPublicPathPlugin.ts
@@ -192,9 +192,9 @@ export class SetPublicPathPlugin extends SetPublicPathPluginBase {
192
const newAsset: webpack.sources.ReplaceSource = new thisWebpack.sources.ReplaceSource(asset);
193
const sourceString: string = asset.source().toString();
194
for (
195
- let index: number = sourceString.indexOf(ASSET_NAME_TOKEN);
+ let index: number = sourceString.lastIndexOf(ASSET_NAME_TOKEN);
196
index >= 0;
197
- index = sourceString.indexOf(ASSET_NAME_TOKEN, index + 1)
+ index = sourceString.lastIndexOf(ASSET_NAME_TOKEN, index - 1)
198
) {
199
newAsset.replace(index, index + ASSET_NAME_TOKEN.length - 1, escapedAssetFilename);
200
}
0 commit comments