@marko/vite 5.3.7 → 5.3.8
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.
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1261,7 +1261,7 @@ function markoPlugin(opts = {}) {
|
|
|
1261
1261
|
)
|
|
1262
1262
|
} : await this.resolve(importee, importer, resolveOpts);
|
|
1263
1263
|
if (resolved) {
|
|
1264
|
-
resolved.id =
|
|
1264
|
+
resolved.id = stripViteQueries(resolved.id) + importeeQuery;
|
|
1265
1265
|
}
|
|
1266
1266
|
return resolved;
|
|
1267
1267
|
}
|
|
@@ -1281,7 +1281,7 @@ function markoPlugin(opts = {}) {
|
|
|
1281
1281
|
return null;
|
|
1282
1282
|
},
|
|
1283
1283
|
async load(rawId) {
|
|
1284
|
-
const id =
|
|
1284
|
+
const id = stripViteQueries(rawId);
|
|
1285
1285
|
if (id === renderAssetsRuntimeId) {
|
|
1286
1286
|
return renderAssetsRuntimeCode;
|
|
1287
1287
|
}
|
|
@@ -1314,7 +1314,7 @@ function markoPlugin(opts = {}) {
|
|
|
1314
1314
|
return virtualFiles.get(id) || null;
|
|
1315
1315
|
},
|
|
1316
1316
|
async transform(source, rawId, ssr) {
|
|
1317
|
-
let id =
|
|
1317
|
+
let id = stripViteQueries(rawId);
|
|
1318
1318
|
const info = isBuild ? this.getModuleInfo(id) : void 0;
|
|
1319
1319
|
const arcSourceId = info?.meta.arcSourceId;
|
|
1320
1320
|
if (arcSourceId) {
|
|
@@ -1604,11 +1604,11 @@ function isEmpty(obj) {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
return true;
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1607
|
+
function stripViteQueries(id) {
|
|
1608
1608
|
const queryStart = id.indexOf("?");
|
|
1609
1609
|
if (queryStart === -1) return id;
|
|
1610
1610
|
const url = id.slice(0, queryStart);
|
|
1611
|
-
const query = id.slice(queryStart + 1).replace(/(?:^|[&])[vt]=[^&]+/g, "");
|
|
1611
|
+
const query = id.slice(queryStart + 1).replace(/(?:^|[&])(?:cache|[vt])=[^&]+/g, "");
|
|
1612
1612
|
if (query) return `${url}?${query}`;
|
|
1613
1613
|
return url;
|
|
1614
1614
|
}
|