@marko/vite 4.1.10 → 4.1.11
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 +17 -11
- package/package.json +15 -15
package/dist/index.mjs
CHANGED
|
@@ -222,8 +222,7 @@ function serialize(basePath, nodes, preload, parts) {
|
|
|
222
222
|
return parts;
|
|
223
223
|
}
|
|
224
224
|
function stripBasePath(basePath, path6) {
|
|
225
|
-
if (path6.startsWith(basePath))
|
|
226
|
-
return path6.slice(basePath.length);
|
|
225
|
+
if (path6.startsWith(basePath)) return path6.slice(basePath.length);
|
|
227
226
|
return path6;
|
|
228
227
|
}
|
|
229
228
|
|
|
@@ -664,6 +663,7 @@ var babelCaller = {
|
|
|
664
663
|
supportsTopLevelAwait: true,
|
|
665
664
|
supportsExportNamespaceFrom: true
|
|
666
665
|
};
|
|
666
|
+
var optimizedRegistryIds = /* @__PURE__ */ new Map();
|
|
667
667
|
var registeredTagLib = false;
|
|
668
668
|
function markoPlugin(opts = {}) {
|
|
669
669
|
let compiler;
|
|
@@ -727,6 +727,7 @@ function markoPlugin(opts = {}) {
|
|
|
727
727
|
baseConfig = {
|
|
728
728
|
cache,
|
|
729
729
|
optimize,
|
|
730
|
+
optimizedRegistryIds: optimize && linked ? optimizedRegistryIds : void 0,
|
|
730
731
|
runtimeId,
|
|
731
732
|
sourceMaps: true,
|
|
732
733
|
writeVersionComment: false,
|
|
@@ -870,7 +871,7 @@ function markoPlugin(opts = {}) {
|
|
|
870
871
|
resolve: {
|
|
871
872
|
alias: [
|
|
872
873
|
{
|
|
873
|
-
find:
|
|
874
|
+
find: /^~(?!\/)/,
|
|
874
875
|
replacement: ""
|
|
875
876
|
}
|
|
876
877
|
]
|
|
@@ -945,6 +946,14 @@ function markoPlugin(opts = {}) {
|
|
|
945
946
|
if (isBuild && linked && !isSSRBuild) {
|
|
946
947
|
try {
|
|
947
948
|
serverManifest = await store.read();
|
|
949
|
+
if (serverManifest.optimizedRegistryIds) {
|
|
950
|
+
for (const id in serverManifest.optimizedRegistryIds) {
|
|
951
|
+
optimizedRegistryIds.set(
|
|
952
|
+
id,
|
|
953
|
+
serverManifest.optimizedRegistryIds[id]
|
|
954
|
+
);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
948
957
|
inputOptions.input = toHTMLEntries(root, serverManifest.entries);
|
|
949
958
|
for (const entry in serverManifest.entrySources) {
|
|
950
959
|
const id = normalizePath(path5.resolve(root, entry));
|
|
@@ -1000,8 +1009,7 @@ function markoPlugin(opts = {}) {
|
|
|
1000
1009
|
const resolved = normalizePath(
|
|
1001
1010
|
path5.resolve(importer, "..", importee)
|
|
1002
1011
|
);
|
|
1003
|
-
if (resolved === normalizePath(importer))
|
|
1004
|
-
return resolved;
|
|
1012
|
+
if (resolved === normalizePath(importer)) return resolved;
|
|
1005
1013
|
}
|
|
1006
1014
|
return this.resolve(importee, importer, resolveOpts);
|
|
1007
1015
|
}
|
|
@@ -1182,6 +1190,7 @@ if (import.meta.hot) import.meta.hot.accept(() => {});`;
|
|
|
1182
1190
|
}
|
|
1183
1191
|
}
|
|
1184
1192
|
}
|
|
1193
|
+
serverManifest.optimizedRegistryIds = Object.fromEntries(optimizedRegistryIds);
|
|
1185
1194
|
store.write(serverManifest);
|
|
1186
1195
|
} else {
|
|
1187
1196
|
const browserManifest = {};
|
|
@@ -1285,18 +1294,15 @@ function isEmpty(obj) {
|
|
|
1285
1294
|
}
|
|
1286
1295
|
function stripVersionAndTimeStamp(id) {
|
|
1287
1296
|
const queryStart = id.indexOf("?");
|
|
1288
|
-
if (queryStart === -1)
|
|
1289
|
-
return id;
|
|
1297
|
+
if (queryStart === -1) return id;
|
|
1290
1298
|
const url = id.slice(0, queryStart);
|
|
1291
1299
|
const query = id.slice(queryStart + 1).replace(/(?:^|[&])[vt]=[^&]+/g, "");
|
|
1292
|
-
if (query)
|
|
1293
|
-
return `${url}?${query}`;
|
|
1300
|
+
if (query) return `${url}?${query}`;
|
|
1294
1301
|
return url;
|
|
1295
1302
|
}
|
|
1296
1303
|
function getConfigForFileSystem(info, config) {
|
|
1297
1304
|
const fileSystem = info?.meta.arcFS;
|
|
1298
|
-
if (!fileSystem)
|
|
1299
|
-
return config;
|
|
1305
|
+
if (!fileSystem) return config;
|
|
1300
1306
|
let configsForFileSystem = configsByFileSystem.get(fileSystem);
|
|
1301
1307
|
if (!configsForFileSystem) {
|
|
1302
1308
|
configsForFileSystem = /* @__PURE__ */ new Map();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/vite",
|
|
3
3
|
"description": "A Marko plugin for Vite",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.11",
|
|
5
5
|
"author": "Dylan Piercey <dpiercey@ebay.com>",
|
|
6
6
|
"bugs": "https://github.com/marko-js/vite/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -15,37 +15,37 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@changesets/changelog-github": "^0.5.0",
|
|
18
|
-
"@changesets/cli": "^2.27.
|
|
19
|
-
"@marko/compiler": "^5.
|
|
18
|
+
"@changesets/cli": "^2.27.5",
|
|
19
|
+
"@marko/compiler": "^5.37.0",
|
|
20
20
|
"@marko/fixture-snapshots": "^2.2.1",
|
|
21
21
|
"@marko/testing-library": "^6.2.0",
|
|
22
22
|
"@types/babel__core": "^7.20.5",
|
|
23
23
|
"@types/jsdom": "^21.1.6",
|
|
24
24
|
"@types/mocha": "^10.0.6",
|
|
25
|
-
"@types/node": "^20.
|
|
25
|
+
"@types/node": "^20.12.12",
|
|
26
26
|
"@types/resolve": "^1.20.6",
|
|
27
27
|
"@types/serve-handler": "^6.1.4",
|
|
28
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
29
|
-
"@typescript-eslint/parser": "^7.
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
29
|
+
"@typescript-eslint/parser": "^7.11.0",
|
|
30
30
|
"cross-env": "^7.0.3",
|
|
31
|
-
"esbuild": "^0.
|
|
31
|
+
"esbuild": "^0.21.4",
|
|
32
32
|
"eslint": "^8.57.0",
|
|
33
33
|
"eslint-config-prettier": "^9.1.0",
|
|
34
34
|
"fixpack": "^4.0.0",
|
|
35
35
|
"husky": "^9.0.11",
|
|
36
|
-
"jsdom": "^24.
|
|
36
|
+
"jsdom": "^24.1.0",
|
|
37
37
|
"less": "^4.2.0",
|
|
38
|
-
"lint-staged": "^15.2.
|
|
39
|
-
"marko": "^5.
|
|
40
|
-
"mocha": "^10.
|
|
38
|
+
"lint-staged": "^15.2.5",
|
|
39
|
+
"marko": "^5.35.0",
|
|
40
|
+
"mocha": "^10.4.0",
|
|
41
41
|
"mocha-snap": "^5.0.0",
|
|
42
42
|
"nyc": "^15.1.0",
|
|
43
|
-
"playwright": "^1.
|
|
43
|
+
"playwright": "^1.44.1",
|
|
44
44
|
"prettier": "^3.2.5",
|
|
45
45
|
"serve-handler": "^6.1.5",
|
|
46
|
-
"tsx": "^4.
|
|
47
|
-
"typescript": "^5.
|
|
48
|
-
"vite": "^5.
|
|
46
|
+
"tsx": "^4.11.0",
|
|
47
|
+
"typescript": "^5.4.5",
|
|
48
|
+
"vite": "^5.2.12"
|
|
49
49
|
},
|
|
50
50
|
"files": [
|
|
51
51
|
"dist",
|