Skip to content

Commit

Permalink
chore(deps): [email protected] (#2974)
Browse files Browse the repository at this point in the history
  • Loading branch information
AviVahl authored Nov 12, 2024
1 parent 6ae4c17 commit 268575d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 19 deletions.
45 changes: 28 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"typescript": "~5.6.3",
"typescript-eslint": "^8.14.0",
"url-loader": "^4.1.1",
"webpack": "~5.95.0",
"webpack": "^5.96.1",
"yargs": "^17.7.2"
},
"engines": {
Expand Down
8 changes: 7 additions & 1 deletion packages/webpack-plugin/src/plugin-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,13 @@ export function replaceMappedCSSAssetPlaceholders({
throw new Error('Missing asset module build info for ' + resourcePath);
}

if (assetModule.buildInfo.dataUrl) {
if (assetModuleSource && assetModule.buildInfo.dataUrl) {
if ('generateDataUri' in assetModule.generator!) {
const assetGenerator = assetModule.generator as {
generateDataUri(m: NormalModule): string;
};
return assetGenerator.generateDataUri(assetModule);
}
// Investigate using the data map from getData currently there is an unknown in term from escaping keeping extractDataUrlFromAssetModuleSource
return extractDataUrlFromAssetModuleSource(
assetModuleSource.source().toString(),
Expand Down

0 comments on commit 268575d

Please sign in to comment.