Skip to content

Commit 27a19b5

Browse files
fix: using data URL only for ECMA
1 parent a1abd3c commit 27a19b5

File tree

2 files changed

+521
-447
lines changed

2 files changed

+521
-447
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ export default async function loader(content, map, meta) {
8787

8888
if (shouldUseURLPlugin(options)) {
8989
const needToResolveURL = !options.esModule;
90+
const isSupportDataURLInNewURL =
91+
options.esModule && Boolean(this._compiler.fsStartTime);
9092

9193
plugins.push(
9294
urlParser({
@@ -102,7 +104,7 @@ export default async function loader(content, map, meta) {
102104
undefined,
103105
urlHandler: (url) => stringifyRequest(this, url),
104106
// Support data urls as input in new URL added in [email protected]
105-
isSupportDataURLInNewURL: Boolean(this._compiler.fsStartTime),
107+
isSupportDataURLInNewURL,
106108
})
107109
);
108110
}

0 commit comments

Comments
 (0)