@marko/vite 2.0.2 → 2.0.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/LICENSE +1 -1
- package/dist/chunk-HWRQJHCN.mjs +22 -0
- package/dist/chunk-MPTD6LHF.mjs +65 -0
- package/dist/chunk-VL2HLMVE.mjs +80 -0
- package/dist/chunk-Z64RCGRQ.mjs +74 -0
- package/dist/components/vite.marko +17 -14
- package/dist/esbuild-plugin.d.ts +3 -0
- package/dist/esbuild-plugin.js +97 -0
- package/dist/esbuild-plugin.mjs +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +158 -149
- package/dist/index.mjs +159 -161
- package/dist/manifest-generator.js +17 -17
- package/dist/manifest-generator.mjs +5 -56
- package/dist/render-assets-transform.js +17 -4
- package/dist/render-assets-transform.mjs +2 -1
- package/dist/serializer.js +14 -17
- package/dist/serializer.mjs +3 -75
- package/dist/server-entry-template.js +13 -13
- package/dist/server-entry-template.mjs +3 -17
- package/package.json +55 -42
- package/dist/components/vite-watch.marko +0 -31
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/index.js
CHANGED
|
@@ -1,56 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
8
|
var __export = (target, all) => {
|
|
26
|
-
__markAsModule(target);
|
|
27
9
|
for (var name in all)
|
|
28
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
29
11
|
};
|
|
30
|
-
var
|
|
31
|
-
if (
|
|
32
|
-
for (let key of __getOwnPropNames(
|
|
33
|
-
if (!__hasOwnProp.call(
|
|
34
|
-
__defProp(
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
35
17
|
}
|
|
36
|
-
return
|
|
18
|
+
return to;
|
|
37
19
|
};
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
__export(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
42
24
|
default: () => markoPlugin
|
|
43
25
|
});
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var import_anymatch =
|
|
50
|
-
var
|
|
51
|
-
var
|
|
26
|
+
module.exports = __toCommonJS(src_exports);
|
|
27
|
+
var import_os = __toESM(require("os"));
|
|
28
|
+
var import_fs = __toESM(require("fs"));
|
|
29
|
+
var import_path = __toESM(require("path"));
|
|
30
|
+
var import_crypto = __toESM(require("crypto"));
|
|
31
|
+
var import_anymatch = __toESM(require("anymatch"));
|
|
32
|
+
var import_url = require("url");
|
|
33
|
+
var import_relative_import_path = require("relative-import-path");
|
|
34
|
+
var import_server_entry_template = __toESM(require("./server-entry-template"));
|
|
35
|
+
var import_manifest_generator = require("./manifest-generator");
|
|
36
|
+
var import_esbuild_plugin = __toESM(require("./esbuild-plugin"));
|
|
52
37
|
const import_meta = {};
|
|
53
|
-
const
|
|
38
|
+
const normalizePath = import_path.default.sep === "\\" ? (id) => id.replace(/\\/g, "/") : (id) => id;
|
|
39
|
+
const virtualFiles = /* @__PURE__ */ new Map();
|
|
54
40
|
const queryReg = /\?marko-.+$/;
|
|
55
41
|
const browserEntryQuery = "?marko-browser-entry";
|
|
56
42
|
const serverEntryQuery = "?marko-server-entry";
|
|
@@ -58,106 +44,124 @@ const virtualFileQuery = "?marko-virtual";
|
|
|
58
44
|
const markoExt = ".marko";
|
|
59
45
|
const htmlExt = ".html";
|
|
60
46
|
const resolveOpts = { skipSelf: true };
|
|
47
|
+
const cache = /* @__PURE__ */ new Map();
|
|
48
|
+
const thisFile = typeof __filename === "string" ? __filename : (0, import_url.fileURLToPath)(import_meta.url);
|
|
61
49
|
let tempDir;
|
|
62
50
|
function markoPlugin(opts = {}) {
|
|
63
51
|
var _a;
|
|
64
52
|
let compiler;
|
|
65
53
|
const { runtimeId, linked = true } = opts;
|
|
66
54
|
const baseConfig = {
|
|
55
|
+
cache,
|
|
67
56
|
runtimeId,
|
|
68
57
|
sourceMaps: true,
|
|
69
58
|
writeVersionComment: false,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
caller:
|
|
59
|
+
babelConfig: {
|
|
60
|
+
...opts.babelConfig,
|
|
61
|
+
caller: {
|
|
73
62
|
name: "@marko/vite",
|
|
74
63
|
supportsStaticESM: true,
|
|
75
64
|
supportsDynamicImport: true,
|
|
76
65
|
supportsTopLevelAwait: true,
|
|
77
|
-
supportsExportNamespaceFrom: true
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
supportsExportNamespaceFrom: true,
|
|
67
|
+
...(_a = opts.babelConfig) == null ? void 0 : _a.caller
|
|
68
|
+
}
|
|
69
|
+
}
|
|
80
70
|
};
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if (devServer) {
|
|
89
|
-
const prev = virtualFiles.get(id);
|
|
90
|
-
if (prev && prev.code !== dep.code) {
|
|
91
|
-
devServer.moduleGraph.invalidateModule(devServer.moduleGraph.getModuleById(id));
|
|
92
|
-
}
|
|
71
|
+
const resolveViteVirtualDep = (from, dep) => {
|
|
72
|
+
const query = `${virtualFileQuery}&id=${normalizePath(dep.virtualPath)}`;
|
|
73
|
+
const id = normalizePath(from) + query;
|
|
74
|
+
if (devServer) {
|
|
75
|
+
const prev = virtualFiles.get(id);
|
|
76
|
+
if (prev && prev.code !== dep.code) {
|
|
77
|
+
devServer.moduleGraph.invalidateModule(devServer.moduleGraph.getModuleById(id));
|
|
93
78
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
79
|
+
}
|
|
80
|
+
virtualFiles.set(id, dep);
|
|
81
|
+
return `./${import_path.default.basename(from) + query}`;
|
|
82
|
+
};
|
|
83
|
+
const ssrConfig = {
|
|
84
|
+
...baseConfig,
|
|
85
|
+
resolveVirtualDependency: resolveViteVirtualDep,
|
|
86
|
+
output: "html"
|
|
87
|
+
};
|
|
88
|
+
const domConfig = {
|
|
89
|
+
...baseConfig,
|
|
90
|
+
resolveVirtualDependency: resolveViteVirtualDep,
|
|
97
91
|
output: "dom"
|
|
98
|
-
}
|
|
99
|
-
const hydrateConfig =
|
|
92
|
+
};
|
|
93
|
+
const hydrateConfig = {
|
|
94
|
+
...baseConfig,
|
|
95
|
+
resolveVirtualDependency: resolveViteVirtualDep,
|
|
100
96
|
output: "hydrate"
|
|
101
|
-
}
|
|
97
|
+
};
|
|
102
98
|
let root;
|
|
99
|
+
let devEntryFile;
|
|
103
100
|
let isBuild = false;
|
|
104
101
|
let isSSRBuild = false;
|
|
105
102
|
let devServer;
|
|
106
103
|
let registeredTag = false;
|
|
107
104
|
let serverManifest;
|
|
108
|
-
const transformWatchFiles = new Map();
|
|
109
|
-
const transformOptionalFiles = new Map();
|
|
105
|
+
const transformWatchFiles = /* @__PURE__ */ new Map();
|
|
106
|
+
const transformOptionalFiles = /* @__PURE__ */ new Map();
|
|
110
107
|
return [
|
|
111
108
|
{
|
|
112
109
|
name: "marko-vite:pre",
|
|
113
110
|
enforce: "pre",
|
|
114
111
|
async config(config, env) {
|
|
115
|
-
var _a2, _b, _c
|
|
116
|
-
compiler
|
|
117
|
-
root = config.root || process.cwd();
|
|
112
|
+
var _a2, _b, _c;
|
|
113
|
+
compiler ?? (compiler = await import(opts.compiler || "@marko/compiler"));
|
|
114
|
+
root = normalizePath(config.root || process.cwd());
|
|
115
|
+
devEntryFile = import_path.default.join(root, "index.html");
|
|
118
116
|
isBuild = env.command === "build";
|
|
119
117
|
isSSRBuild = isBuild && linked && Boolean(config.build.ssr);
|
|
120
|
-
if (!registeredTag) {
|
|
121
|
-
const transformer = import_path.default.resolve(
|
|
122
|
-
registeredTag = import_path.default.resolve(
|
|
118
|
+
if (linked && !registeredTag) {
|
|
119
|
+
const transformer = import_path.default.resolve(thisFile, "../render-assets-transform");
|
|
120
|
+
registeredTag = normalizePath(import_path.default.resolve(thisFile, "../components", "vite.marko"));
|
|
123
121
|
compiler.taglib.register("@marko/vite", {
|
|
124
122
|
"<_vite>": { template: registeredTag },
|
|
125
123
|
"<head>": { transformer },
|
|
126
124
|
"<body>": { transformer }
|
|
127
125
|
});
|
|
128
126
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const entry = tag.template || tag.renderer;
|
|
140
|
-
if (entry) {
|
|
141
|
-
taglibDeps.push(entry.replace(/^.*?[\\/]node_modules[\\/]/, ""));
|
|
142
|
-
}
|
|
127
|
+
const lookup = compiler.taglib.buildLookup(root);
|
|
128
|
+
const taglibDeps = [];
|
|
129
|
+
for (const name in lookup.taglibsById) {
|
|
130
|
+
const taglib = lookup.taglibsById[name];
|
|
131
|
+
if (!/^marko-(.+-)?core$/.test(taglib.id) && /[\\/]node_modules[\\/]/.test(taglib.dirname)) {
|
|
132
|
+
for (const tagName in taglib.tags) {
|
|
133
|
+
const tag = taglib.tags[tagName];
|
|
134
|
+
const entry = tag.template || tag.renderer;
|
|
135
|
+
if (entry) {
|
|
136
|
+
taglibDeps.push((0, import_relative_import_path.relativeImportPath)(devEntryFile, entry));
|
|
143
137
|
}
|
|
144
138
|
}
|
|
145
139
|
}
|
|
146
|
-
const domDeps = Array.from(new Set(domRuntimeDeps.concat(taglibDeps)));
|
|
147
|
-
const serverDeps = Array.from(new Set(htmlRuntimeDeps.concat(taglibDeps)));
|
|
148
|
-
const optimizeDeps = (_a2 = config.optimizeDeps) != null ? _a2 : config.optimizeDeps = {};
|
|
149
|
-
(_b = optimizeDeps.include) != null ? _b : optimizeDeps.include = [];
|
|
150
|
-
optimizeDeps.include = optimizeDeps.include.concat(domDeps.filter((dep) => import_path.default.extname(dep) !== markoExt));
|
|
151
|
-
(_c = optimizeDeps.exclude) != null ? _c : optimizeDeps.exclude = [];
|
|
152
|
-
optimizeDeps.exclude = optimizeDeps.exclude.concat(domDeps.filter((dep) => import_path.default.extname(dep) === markoExt));
|
|
153
|
-
const ssr = (_d = config.ssr) != null ? _d : config.ssr = {};
|
|
154
|
-
(_e = ssr.external) != null ? _e : ssr.external = [];
|
|
155
|
-
ssr.external = ssr.external.concat(serverDeps);
|
|
156
|
-
(await Promise.resolve().then(() => __toModule(require("@marko/compiler/register")))).default(__spreadProps(__spreadValues({}, ssrConfig), {
|
|
157
|
-
sourceMaps: "inline",
|
|
158
|
-
modules: "cjs"
|
|
159
|
-
}));
|
|
160
140
|
}
|
|
141
|
+
const optimizeDeps = config.optimizeDeps ?? (config.optimizeDeps = {});
|
|
142
|
+
optimizeDeps.include = Array.from(/* @__PURE__ */ new Set([
|
|
143
|
+
...optimizeDeps.include || [],
|
|
144
|
+
...compiler.getRuntimeEntryFiles("dom", opts.translator),
|
|
145
|
+
...compiler.getRuntimeEntryFiles("html", opts.translator),
|
|
146
|
+
...taglibDeps
|
|
147
|
+
]));
|
|
148
|
+
const ssr = config.ssr ?? (config.ssr = {});
|
|
149
|
+
if (ssr.noExternal !== true) {
|
|
150
|
+
ssr.noExternal = Array.from(new Set(taglibDeps.concat(ssr.noExternal || [])));
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
...config,
|
|
154
|
+
optimizeDeps: {
|
|
155
|
+
...config.optimizeDeps,
|
|
156
|
+
extensions: [".marko", ...((_a2 = config.optimizeDeps) == null ? void 0 : _a2.extensions) || []],
|
|
157
|
+
esbuildOptions: {
|
|
158
|
+
plugins: [
|
|
159
|
+
(0, import_esbuild_plugin.default)(compiler, baseConfig),
|
|
160
|
+
...((_c = (_b = config.optimizeDeps) == null ? void 0 : _b.esbuildOptions) == null ? void 0 : _c.plugins) || []
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
};
|
|
161
165
|
},
|
|
162
166
|
configureServer(_server) {
|
|
163
167
|
ssrConfig.hot = domConfig.hot = true;
|
|
@@ -197,63 +201,64 @@ function markoPlugin(opts = {}) {
|
|
|
197
201
|
}
|
|
198
202
|
}
|
|
199
203
|
},
|
|
200
|
-
async resolveId(importee, importer,
|
|
201
|
-
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
204
|
+
async resolveId(importee, importer, importOpts, ssr = importOpts.ssr) {
|
|
205
|
+
var _a2;
|
|
206
|
+
if (virtualFiles.has(importee)) {
|
|
207
|
+
return importee;
|
|
208
|
+
}
|
|
209
|
+
let importeeQuery = getMarkoQuery(importee);
|
|
210
|
+
if (importeeQuery) {
|
|
211
|
+
importee = importee.slice(0, -importeeQuery.length);
|
|
212
|
+
} else if (ssr && linked && importer && importer !== devEntryFile && isMarkoFile(importee) && !isMarkoFile(importer.replace(queryReg, ""))) {
|
|
213
|
+
importeeQuery = serverEntryQuery;
|
|
214
|
+
} else if (!ssr && isBuild && importer && isMarkoFile(importee) && ((_a2 = this.getModuleInfo(importer)) == null ? void 0 : _a2.isEntry)) {
|
|
215
|
+
importeeQuery = browserEntryQuery;
|
|
216
|
+
}
|
|
217
|
+
if (importeeQuery) {
|
|
218
|
+
const resolved = importee[0] === "." ? {
|
|
219
|
+
id: normalizePath(importer ? import_path.default.resolve(importer, "..", importee) : import_path.default.resolve(root, importee))
|
|
220
|
+
} : await this.resolve(importee, importer, resolveOpts);
|
|
221
|
+
if (resolved) {
|
|
222
|
+
resolved.id += importeeQuery;
|
|
219
223
|
}
|
|
224
|
+
return resolved;
|
|
220
225
|
}
|
|
221
226
|
return null;
|
|
222
227
|
},
|
|
223
228
|
async load(id) {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
const relativeFileName = import_path.default.relative(root, fileName);
|
|
235
|
-
const entryId = toEntryId(relativeFileName);
|
|
236
|
-
serverManifest != null ? serverManifest : serverManifest = {
|
|
237
|
-
entries: {},
|
|
238
|
-
chunksNeedingAssets: []
|
|
239
|
-
};
|
|
240
|
-
serverManifest.entries[entryId] = relativeFileName;
|
|
241
|
-
entryData = JSON.stringify(entryId);
|
|
242
|
-
} else {
|
|
243
|
-
entryData = JSON.stringify(await (0, import_manifest_generator.generateDocManifest)(await devServer.transformIndexHtml("/", (0, import_manifest_generator.generateInputDoc)(fileNameToURL(fileName, root) + browserEntryQuery))));
|
|
244
|
-
}
|
|
245
|
-
return (0, import_server_entry_template.default)({
|
|
246
|
-
fileName,
|
|
247
|
-
entryData,
|
|
248
|
-
runtimeId
|
|
229
|
+
switch (getMarkoQuery(id)) {
|
|
230
|
+
case serverEntryQuery: {
|
|
231
|
+
const fileName = id.slice(0, -serverEntryQuery.length);
|
|
232
|
+
let entryData;
|
|
233
|
+
if (isBuild) {
|
|
234
|
+
const relativeFileName = import_path.default.posix.relative(root, fileName);
|
|
235
|
+
const entryId = toEntryId(relativeFileName);
|
|
236
|
+
serverManifest ?? (serverManifest = {
|
|
237
|
+
entries: {},
|
|
238
|
+
chunksNeedingAssets: []
|
|
249
239
|
});
|
|
240
|
+
serverManifest.entries[entryId] = relativeFileName;
|
|
241
|
+
entryData = JSON.stringify(entryId);
|
|
242
|
+
} else {
|
|
243
|
+
entryData = JSON.stringify(await (0, import_manifest_generator.generateDocManifest)(await devServer.transformIndexHtml("/", (0, import_manifest_generator.generateInputDoc)(fileNameToURL(fileName, root)))));
|
|
250
244
|
}
|
|
251
|
-
|
|
252
|
-
|
|
245
|
+
return (0, import_server_entry_template.default)({
|
|
246
|
+
fileName,
|
|
247
|
+
entryData,
|
|
248
|
+
runtimeId
|
|
249
|
+
});
|
|
253
250
|
}
|
|
251
|
+
case browserEntryQuery:
|
|
252
|
+
return import_fs.default.promises.readFile(id.slice(0, -browserEntryQuery.length), "utf-8");
|
|
254
253
|
}
|
|
255
254
|
return virtualFiles.get(id) || null;
|
|
256
255
|
},
|
|
256
|
+
async transformIndexHtml(html) {
|
|
257
|
+
if (isBuild) {
|
|
258
|
+
return html;
|
|
259
|
+
}
|
|
260
|
+
return html.replace(/(src\s*=\s*(['"])(?:(?!\2).)*\.marko)(?:\?((?:(?!\2).)*))?\2/gim, (_, prefix, quote, query) => prefix + browserEntryQuery + (query ? "&" + query : "") + quote);
|
|
261
|
+
},
|
|
257
262
|
async transform(source, id, ssr) {
|
|
258
263
|
const query = getMarkoQuery(id);
|
|
259
264
|
if (query && !query.startsWith(virtualFileQuery)) {
|
|
@@ -265,7 +270,7 @@ function markoPlugin(opts = {}) {
|
|
|
265
270
|
if (!isMarkoFile(id)) {
|
|
266
271
|
return null;
|
|
267
272
|
}
|
|
268
|
-
const compiled = await compiler.compile(source, id, ssr ? ssrConfig : query === browserEntryQuery ? hydrateConfig : domConfig);
|
|
273
|
+
const compiled = await compiler.compile(source, id, (typeof ssr === "object" ? ssr.ssr : ssr) ? ssrConfig : query === browserEntryQuery ? hydrateConfig : domConfig);
|
|
269
274
|
const { map, meta } = compiled;
|
|
270
275
|
let { code } = compiled;
|
|
271
276
|
if (query !== browserEntryQuery && devServer) {
|
|
@@ -321,8 +326,12 @@ if (import.meta.hot) import.meta.hot.accept();`;
|
|
|
321
326
|
const browserManifest = {};
|
|
322
327
|
for (const entryId in serverManifest.entries) {
|
|
323
328
|
const fileName = serverManifest.entries[entryId];
|
|
324
|
-
|
|
325
|
-
|
|
329
|
+
let chunkId = fileName + htmlExt;
|
|
330
|
+
let chunk = bundle[chunkId];
|
|
331
|
+
if (!chunk) {
|
|
332
|
+
chunkId = chunkId.replace(/\//g, "\\");
|
|
333
|
+
chunk = bundle[chunkId];
|
|
334
|
+
}
|
|
326
335
|
if ((chunk == null ? void 0 : chunk.type) === "asset") {
|
|
327
336
|
browserManifest[entryId] = await (0, import_manifest_generator.generateDocManifest)(chunk.source.toString());
|
|
328
337
|
delete bundle[chunkId];
|
|
@@ -350,10 +359,10 @@ function isMarkoFile(id) {
|
|
|
350
359
|
function toHTMLEntries(root, serverEntries) {
|
|
351
360
|
const result = [];
|
|
352
361
|
for (const id in serverEntries) {
|
|
353
|
-
const markoFile = import_path.default.join(root, serverEntries[id]);
|
|
362
|
+
const markoFile = import_path.default.posix.join(root, serverEntries[id]);
|
|
354
363
|
const htmlFile = markoFile + htmlExt;
|
|
355
364
|
virtualFiles.set(htmlFile, {
|
|
356
|
-
code: (0, import_manifest_generator.generateInputDoc)(markoFile
|
|
365
|
+
code: (0, import_manifest_generator.generateInputDoc)(markoFile)
|
|
357
366
|
});
|
|
358
367
|
result.push(htmlFile);
|
|
359
368
|
}
|