@marko/vite 2.3.0 → 2.3.3
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/{chunk-2WEBYHWI.mjs → chunk-LBJFIET7.mjs} +1 -5
- package/dist/esbuild-plugin.js +1 -5
- package/dist/esbuild-plugin.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -2
- package/dist/render-assets-transform.js +1 -1
- package/dist/render-assets-transform.mjs +1 -1
- package/package.json +1 -1
|
@@ -31,12 +31,8 @@ function esbuildPlugin(compiler, config) {
|
|
|
31
31
|
contents: virtualFiles.get(args.path).code,
|
|
32
32
|
loader: path.extname(args.path).slice(1)
|
|
33
33
|
}));
|
|
34
|
-
build.onResolve({ filter: /\.marko$/ }, async (args) => ({
|
|
35
|
-
namespace: "file",
|
|
36
|
-
path: path.resolve(args.resolveDir, args.path)
|
|
37
|
-
}));
|
|
38
34
|
}
|
|
39
|
-
build.onLoad({ filter: /\.marko
|
|
35
|
+
build.onLoad({ filter: /\.marko$/ }, async (args) => {
|
|
40
36
|
try {
|
|
41
37
|
const { code, meta } = await compiler.compileFile(args.path, finalConfig);
|
|
42
38
|
return {
|
package/dist/esbuild-plugin.js
CHANGED
|
@@ -73,12 +73,8 @@ function esbuildPlugin(compiler, config) {
|
|
|
73
73
|
contents: virtualFiles.get(args.path).code,
|
|
74
74
|
loader: import_path.default.extname(args.path).slice(1)
|
|
75
75
|
}));
|
|
76
|
-
build.onResolve({ filter: /\.marko$/ }, async (args) => ({
|
|
77
|
-
namespace: "file",
|
|
78
|
-
path: import_path.default.resolve(args.resolveDir, args.path)
|
|
79
|
-
}));
|
|
80
76
|
}
|
|
81
|
-
build.onLoad({ filter: /\.marko
|
|
77
|
+
build.onLoad({ filter: /\.marko$/ }, async (args) => {
|
|
82
78
|
try {
|
|
83
79
|
const { code, meta } = await compiler.compileFile(args.path, finalConfig);
|
|
84
80
|
return {
|
package/dist/esbuild-plugin.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -88,7 +88,7 @@ function markoPlugin(opts = {}) {
|
|
|
88
88
|
})
|
|
89
89
|
};
|
|
90
90
|
const resolveViteVirtualDep = (from, dep) => {
|
|
91
|
-
const query = `${virtualFileQuery}&id=${
|
|
91
|
+
const query = `${virtualFileQuery}&id=${normalizePath(dep.virtualPath)}`;
|
|
92
92
|
const id = normalizePath(from) + query;
|
|
93
93
|
if (devServer) {
|
|
94
94
|
const prev = virtualFiles.get(id);
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
esbuildPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LBJFIET7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
generateDocManifest,
|
|
6
6
|
generateInputDoc
|
|
@@ -53,7 +53,7 @@ function markoPlugin(opts = {}) {
|
|
|
53
53
|
})
|
|
54
54
|
};
|
|
55
55
|
const resolveViteVirtualDep = (from, dep) => {
|
|
56
|
-
const query = `${virtualFileQuery}&id=${
|
|
56
|
+
const query = `${virtualFileQuery}&id=${normalizePath(dep.virtualPath)}`;
|
|
57
57
|
const id = normalizePath(from) + query;
|
|
58
58
|
if (devServer) {
|
|
59
59
|
const prev = virtualFiles.get(id);
|
|
@@ -31,7 +31,7 @@ var render_assets_transform_default = (tag, t) => {
|
|
|
31
31
|
body.pushContainer("body", renderAssetsCall(t, tagName));
|
|
32
32
|
};
|
|
33
33
|
function renderAssetsCall(t, slot) {
|
|
34
|
-
return t.
|
|
34
|
+
return t.markoPlaceholder(t.callExpression(t.memberExpression(t.memberExpression(t.identifier("out"), t.identifier("global")), t.identifier("___viteRenderAssets")), [t.stringLiteral(slot)]), false);
|
|
35
35
|
}
|
|
36
36
|
module.exports = __toCommonJS(render_assets_transform_exports);
|
|
37
37
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -8,7 +8,7 @@ var render_assets_transform_default = (tag, t) => {
|
|
|
8
8
|
body.pushContainer("body", renderAssetsCall(t, tagName));
|
|
9
9
|
};
|
|
10
10
|
function renderAssetsCall(t, slot) {
|
|
11
|
-
return t.
|
|
11
|
+
return t.markoPlaceholder(t.callExpression(t.memberExpression(t.memberExpression(t.identifier("out"), t.identifier("global")), t.identifier("___viteRenderAssets")), [t.stringLiteral(slot)]), false);
|
|
12
12
|
}
|
|
13
13
|
export {
|
|
14
14
|
render_assets_transform_default as default
|