@marko/vite 5.1.5 → 5.1.7
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 +3 -18
- package/package.json +28 -28
package/dist/index.mjs
CHANGED
|
@@ -169,14 +169,9 @@ function esbuildPlugin(config) {
|
|
|
169
169
|
const isScan = build.initialOptions.plugins?.some(
|
|
170
170
|
(v) => v.name === "vite:dep-scan"
|
|
171
171
|
);
|
|
172
|
-
const virtualFiles2 = /* @__PURE__ */ new Map();
|
|
173
172
|
const finalConfig = {
|
|
174
173
|
...config,
|
|
175
|
-
output: platform === "browser" ? "dom" : "html"
|
|
176
|
-
resolveVirtualDependency(from, dep) {
|
|
177
|
-
virtualFiles2.set(path2.join(from, "..", dep.virtualPath), dep);
|
|
178
|
-
return dep.virtualPath;
|
|
179
|
-
}
|
|
174
|
+
output: platform === "browser" ? "dom" : "html"
|
|
180
175
|
};
|
|
181
176
|
const scanConfig = {
|
|
182
177
|
...finalConfig,
|
|
@@ -184,18 +179,10 @@ function esbuildPlugin(config) {
|
|
|
184
179
|
};
|
|
185
180
|
build.onResolve({ filter: /\.marko\./ }, (args) => {
|
|
186
181
|
return {
|
|
187
|
-
namespace: "marko:virtual",
|
|
188
182
|
path: path2.resolve(args.resolveDir, args.path),
|
|
189
|
-
external:
|
|
183
|
+
external: true
|
|
190
184
|
};
|
|
191
185
|
});
|
|
192
|
-
build.onLoad(
|
|
193
|
-
{ filter: /\.marko\./, namespace: "marko:virtual" },
|
|
194
|
-
(args) => ({
|
|
195
|
-
contents: virtualFiles2.get(args.path).code,
|
|
196
|
-
loader: path2.extname(args.path).slice(1)
|
|
197
|
-
})
|
|
198
|
-
);
|
|
199
186
|
build.onLoad({ filter: /\.marko$/ }, async (args) => {
|
|
200
187
|
try {
|
|
201
188
|
const { code, meta } = await compiler.compileFile(
|
|
@@ -886,6 +873,7 @@ function markoPlugin(opts = {}) {
|
|
|
886
873
|
runtimeId,
|
|
887
874
|
sourceMaps: true,
|
|
888
875
|
writeVersionComment: false,
|
|
876
|
+
resolveVirtualDependency,
|
|
889
877
|
optimizeKnownTemplates: optimize && linked ? getKnownTemplates(root) : void 0,
|
|
890
878
|
babelConfig: opts.babelConfig ? {
|
|
891
879
|
...opts.babelConfig,
|
|
@@ -917,7 +905,6 @@ function markoPlugin(opts = {}) {
|
|
|
917
905
|
});
|
|
918
906
|
ssrConfig = {
|
|
919
907
|
...baseConfig,
|
|
920
|
-
resolveVirtualDependency,
|
|
921
908
|
output: "html"
|
|
922
909
|
};
|
|
923
910
|
ssrCjsConfig = {
|
|
@@ -926,7 +913,6 @@ function markoPlugin(opts = {}) {
|
|
|
926
913
|
};
|
|
927
914
|
domConfig = {
|
|
928
915
|
...baseConfig,
|
|
929
|
-
resolveVirtualDependency,
|
|
930
916
|
output: "dom"
|
|
931
917
|
};
|
|
932
918
|
if (isTest) {
|
|
@@ -934,7 +920,6 @@ function markoPlugin(opts = {}) {
|
|
|
934
920
|
}
|
|
935
921
|
hydrateConfig = {
|
|
936
922
|
...baseConfig,
|
|
937
|
-
resolveVirtualDependency,
|
|
938
923
|
output: "hydrate"
|
|
939
924
|
};
|
|
940
925
|
compiler2.configure(baseConfig);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/vite",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.7",
|
|
4
4
|
"description": "A Marko plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"loader",
|
|
@@ -45,51 +45,51 @@
|
|
|
45
45
|
"anymatch": "^3.1.3",
|
|
46
46
|
"domelementtype": "^2.3.0",
|
|
47
47
|
"domhandler": "^5.0.3",
|
|
48
|
-
"fast-glob": "^3.3.
|
|
49
|
-
"htmlparser2": "^
|
|
50
|
-
"resolve": "^1.22.
|
|
51
|
-
"resolve.exports": "^2.0.
|
|
48
|
+
"fast-glob": "^3.3.3",
|
|
49
|
+
"htmlparser2": "^10.0.0",
|
|
50
|
+
"resolve": "^1.22.10",
|
|
51
|
+
"resolve.exports": "^2.0.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@changesets/changelog-github": "^0.5.
|
|
55
|
-
"@changesets/cli": "^2.
|
|
56
|
-
"@eslint/js": "^9.
|
|
57
|
-
"@marko/compiler": "^5.
|
|
54
|
+
"@changesets/changelog-github": "^0.5.1",
|
|
55
|
+
"@changesets/cli": "^2.29.5",
|
|
56
|
+
"@eslint/js": "^9.29.0",
|
|
57
|
+
"@marko/compiler": "^5.39.28",
|
|
58
58
|
"@marko/fixture-snapshots": "^2.2.1",
|
|
59
59
|
"@marko/testing-library": "^6.2.0",
|
|
60
60
|
"@types/babel__core": "^7.20.5",
|
|
61
|
-
"@types/diff": "^
|
|
61
|
+
"@types/diff": "^8.0.0",
|
|
62
62
|
"@types/jsdom": "^21.1.7",
|
|
63
63
|
"@types/mocha": "^10.0.10",
|
|
64
|
-
"@types/node": "^
|
|
64
|
+
"@types/node": "^24.0.4",
|
|
65
65
|
"@types/resolve": "^1.20.6",
|
|
66
66
|
"@types/serve-handler": "^6.1.4",
|
|
67
67
|
"cross-env": "^7.0.3",
|
|
68
|
-
"diff": "^
|
|
69
|
-
"esbuild": "^0.
|
|
70
|
-
"eslint": "^9.
|
|
68
|
+
"diff": "^8.0.2",
|
|
69
|
+
"esbuild": "^0.25.5",
|
|
70
|
+
"eslint": "^9.29.0",
|
|
71
71
|
"eslint-formatter-unix": "^8.40.0",
|
|
72
72
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
73
|
-
"globals": "^
|
|
73
|
+
"globals": "^16.2.0",
|
|
74
74
|
"husky": "^9.1.7",
|
|
75
|
-
"jsdom": "^
|
|
76
|
-
"less": "^4.
|
|
77
|
-
"lint-staged": "^
|
|
78
|
-
"marko": "^5.
|
|
79
|
-
"mocha": "^
|
|
75
|
+
"jsdom": "^26.1.0",
|
|
76
|
+
"less": "^4.3.0",
|
|
77
|
+
"lint-staged": "^16.1.2",
|
|
78
|
+
"marko": "^5.37.40",
|
|
79
|
+
"mocha": "^11.7.1",
|
|
80
80
|
"mocha-snap": "^5.0.0",
|
|
81
81
|
"nyc": "^17.1.0",
|
|
82
|
-
"playwright": "^1.
|
|
83
|
-
"prettier": "^3.
|
|
84
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
82
|
+
"playwright": "^1.53.1",
|
|
83
|
+
"prettier": "^3.6.1",
|
|
84
|
+
"prettier-plugin-packagejson": "^2.5.15",
|
|
85
85
|
"serve-handler": "^6.1.6",
|
|
86
|
-
"tsx": "^4.
|
|
87
|
-
"typescript": "^5.
|
|
88
|
-
"typescript-eslint": "^8.
|
|
89
|
-
"vite": "^
|
|
86
|
+
"tsx": "^4.20.3",
|
|
87
|
+
"typescript": "^5.8.3",
|
|
88
|
+
"typescript-eslint": "^8.35.0",
|
|
89
|
+
"vite": "^7.0.0"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"@marko/compiler": "^5",
|
|
93
|
-
"vite": "4 -
|
|
93
|
+
"vite": "4 - 7"
|
|
94
94
|
}
|
|
95
95
|
}
|