vite-ssg-optimized 0.24.2-optimized.26 → 0.24.2-optimized.28
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/client/single-page.cjs +1 -1
- package/dist/client/single-page.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/node/cli.cjs +1 -1
- package/dist/node/cli.mjs +1 -1
- package/dist/node.cjs +1 -1
- package/dist/node.mjs +1 -1
- package/dist/shared/build.worker.cjs +13 -14
- package/dist/shared/build.worker.mjs +13 -14
- package/dist/shared/{vite-ssg-optimized.ea83ea83.cjs → vite-ssg-optimized.1efabb47.cjs} +37 -28
- package/dist/shared/{vite-ssg-optimized.1ce2784c.mjs → vite-ssg-optimized.44cef1f4.mjs} +35 -26
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ function ViteSSG(App, fn, options = {}) {
|
|
|
17
17
|
const app = client ? vue.createApp(App) : vue.createSSRApp(App);
|
|
18
18
|
let head;
|
|
19
19
|
if (useHead) {
|
|
20
|
-
head =
|
|
20
|
+
head = vue$1.createHead();
|
|
21
21
|
app.use(head);
|
|
22
22
|
}
|
|
23
23
|
const appRenderCallbacks = [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createHead
|
|
1
|
+
import { createHead } from '@unhead/vue';
|
|
2
2
|
import { createApp, createSSRApp } from 'vue';
|
|
3
3
|
import { C as ClientOnly, d as documentReady } from '../shared/vite-ssg-optimized.5912142e.mjs';
|
|
4
4
|
import { d as deserializeState } from '../shared/vite-ssg-optimized.579feabb.mjs';
|
|
@@ -15,7 +15,7 @@ function ViteSSG(App, fn, options = {}) {
|
|
|
15
15
|
const app = client ? createApp(App) : createSSRApp(App);
|
|
16
16
|
let head;
|
|
17
17
|
if (useHead) {
|
|
18
|
-
head =
|
|
18
|
+
head = createHead();
|
|
19
19
|
app.use(head);
|
|
20
20
|
}
|
|
21
21
|
const appRenderCallbacks = [];
|
package/dist/index.cjs
CHANGED
|
@@ -19,7 +19,7 @@ function ViteSSG(App, routerOptions, fn, options = {}) {
|
|
|
19
19
|
const app = client && !isHydrationMode ? vue.createApp(App) : vue.createSSRApp(App);
|
|
20
20
|
let head;
|
|
21
21
|
if (useHead) {
|
|
22
|
-
head =
|
|
22
|
+
head = vue$1.createHead();
|
|
23
23
|
app.use(head);
|
|
24
24
|
}
|
|
25
25
|
const router = vueRouter.createRouter({
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createHead
|
|
1
|
+
import { createHead } from '@unhead/vue';
|
|
2
2
|
import { createApp, createSSRApp } from 'vue';
|
|
3
3
|
import { createRouter, createWebHistory, createMemoryHistory } from 'vue-router';
|
|
4
4
|
import { C as ClientOnly, d as documentReady } from './shared/vite-ssg-optimized.5912142e.mjs';
|
|
@@ -17,7 +17,7 @@ function ViteSSG(App, routerOptions, fn, options = {}) {
|
|
|
17
17
|
const app = client && !isHydrationMode ? createApp(App) : createSSRApp(App);
|
|
18
18
|
let head;
|
|
19
19
|
if (useHead) {
|
|
20
|
-
head =
|
|
20
|
+
head = createHead();
|
|
21
21
|
app.use(head);
|
|
22
22
|
}
|
|
23
23
|
const router = createRouter({
|
package/dist/node/cli.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const process = require('node:process');
|
|
|
4
4
|
const kolorist = require('kolorist');
|
|
5
5
|
const yargs = require('yargs');
|
|
6
6
|
const helpers = require('yargs/helpers');
|
|
7
|
-
const node = require('../shared/vite-ssg-optimized.
|
|
7
|
+
const node = require('../shared/vite-ssg-optimized.1efabb47.cjs');
|
|
8
8
|
require('node:module');
|
|
9
9
|
require('node:path');
|
|
10
10
|
require('@unhead/ssr');
|
package/dist/node/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import process from 'node:process';
|
|
|
2
2
|
import { gray, bold, red, reset, underline } from 'kolorist';
|
|
3
3
|
import yargs from 'yargs';
|
|
4
4
|
import { hideBin } from 'yargs/helpers';
|
|
5
|
-
import { b as build } from '../shared/vite-ssg-optimized.
|
|
5
|
+
import { b as build } from '../shared/vite-ssg-optimized.44cef1f4.mjs';
|
|
6
6
|
import 'node:module';
|
|
7
7
|
import 'node:path';
|
|
8
8
|
import '@unhead/ssr';
|
package/dist/node.cjs
CHANGED
package/dist/node.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const node_module = require('node:module');
|
|
4
4
|
const node_worker_threads = require('node:worker_threads');
|
|
5
|
-
const node = require('./vite-ssg-optimized.
|
|
5
|
+
const node = require('./vite-ssg-optimized.1efabb47.cjs');
|
|
6
6
|
const kolorist = require('kolorist');
|
|
7
7
|
const vite = require('vite');
|
|
8
8
|
require('node:path');
|
|
@@ -73,25 +73,24 @@ async function getBeastiesOrCritters(outDir, options = {}) {
|
|
|
73
73
|
onBeforePageRender
|
|
74
74
|
// onDonePageRender,
|
|
75
75
|
} = config.ssgOptions || {};
|
|
76
|
-
let beasties = void 0;
|
|
77
76
|
const { renderToString } = await import('vue/server-renderer');
|
|
78
77
|
const outDir = out.replace(process.cwd(), "").replace(/^\//g, "");
|
|
79
78
|
const _require = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/build.worker.cjs', document.baseURI).href)));
|
|
80
|
-
let
|
|
79
|
+
let createAppPromise = void 0;
|
|
80
|
+
let beastiesPromise = void 0;
|
|
81
81
|
const execMap = {
|
|
82
82
|
executeTaskFn: async (opts) => {
|
|
83
83
|
const { serverEntry } = opts;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
createApp = mod.createApp;
|
|
87
|
-
}
|
|
84
|
+
createAppPromise ?? (createAppPromise = Promise.resolve(format === "esm" ? import(serverEntry) : _require(serverEntry)).then(({ createApp: createApp2 }) => createApp2));
|
|
85
|
+
const createApp = await createAppPromise;
|
|
88
86
|
const beastiesOptions = opts.beastiesOptions;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
87
|
+
beastiesPromise ?? (beastiesPromise = Promise.resolve(beastiesOptions !== false ? getBeastiesOrCritters(outDir, beastiesOptions) : void 0).then((beasties3) => {
|
|
88
|
+
if (!beasties3)
|
|
89
|
+
return;
|
|
90
|
+
console.log(`${kolorist.gray("[vite-ssg]")} ${kolorist.blue("Critical CSS generation enabled via `beasties`")}`);
|
|
91
|
+
return beasties3;
|
|
92
|
+
}));
|
|
93
|
+
const beasties2 = await beastiesPromise;
|
|
95
94
|
const newOpts = {
|
|
96
95
|
...extraOpts,
|
|
97
96
|
out,
|
|
@@ -101,7 +100,7 @@ async function getBeastiesOrCritters(outDir, options = {}) {
|
|
|
101
100
|
onPageRendered,
|
|
102
101
|
onBeforePageRender,
|
|
103
102
|
// onDonePageRender: onDonePageRender,
|
|
104
|
-
beasties,
|
|
103
|
+
beasties: beasties2,
|
|
105
104
|
config: { logger: { info: (msg) => {
|
|
106
105
|
node_worker_threads.parentPort.postMessage({ type: "log", args: [msg] });
|
|
107
106
|
} } },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';
|
|
2
2
|
import { parentPort, workerData } from 'node:worker_threads';
|
|
3
|
-
import { p as plainify, e as executeTaskFn, a as buildClient, c as buildServer } from './vite-ssg-optimized.
|
|
3
|
+
import { p as plainify, e as executeTaskFn, a as buildClient, c as buildServer } from './vite-ssg-optimized.44cef1f4.mjs';
|
|
4
4
|
import { red, gray, blue } from 'kolorist';
|
|
5
5
|
import { resolveConfig } from 'vite';
|
|
6
6
|
import 'node:path';
|
|
@@ -70,25 +70,24 @@ async function getBeastiesOrCritters(outDir, options = {}) {
|
|
|
70
70
|
onBeforePageRender
|
|
71
71
|
// onDonePageRender,
|
|
72
72
|
} = config.ssgOptions || {};
|
|
73
|
-
let beasties = void 0;
|
|
74
73
|
const { renderToString } = await import('vue/server-renderer');
|
|
75
74
|
const outDir = out.replace(process.cwd(), "").replace(/^\//g, "");
|
|
76
75
|
const _require = createRequire(import.meta.url);
|
|
77
|
-
let
|
|
76
|
+
let createAppPromise = void 0;
|
|
77
|
+
let beastiesPromise = void 0;
|
|
78
78
|
const execMap = {
|
|
79
79
|
executeTaskFn: async (opts) => {
|
|
80
80
|
const { serverEntry } = opts;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
createApp = mod.createApp;
|
|
84
|
-
}
|
|
81
|
+
createAppPromise ?? (createAppPromise = Promise.resolve(format === "esm" ? import(serverEntry) : _require(serverEntry)).then(({ createApp: createApp2 }) => createApp2));
|
|
82
|
+
const createApp = await createAppPromise;
|
|
85
83
|
const beastiesOptions = opts.beastiesOptions;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
84
|
+
beastiesPromise ?? (beastiesPromise = Promise.resolve(beastiesOptions !== false ? getBeastiesOrCritters(outDir, beastiesOptions) : void 0).then((beasties3) => {
|
|
85
|
+
if (!beasties3)
|
|
86
|
+
return;
|
|
87
|
+
console.log(`${gray("[vite-ssg]")} ${blue("Critical CSS generation enabled via `beasties`")}`);
|
|
88
|
+
return beasties3;
|
|
89
|
+
}));
|
|
90
|
+
const beasties2 = await beastiesPromise;
|
|
92
91
|
const newOpts = {
|
|
93
92
|
...extraOpts,
|
|
94
93
|
out,
|
|
@@ -98,7 +97,7 @@ async function getBeastiesOrCritters(outDir, options = {}) {
|
|
|
98
97
|
onPageRendered,
|
|
99
98
|
onBeforePageRender,
|
|
100
99
|
// onDonePageRender: onDonePageRender,
|
|
101
|
-
beasties,
|
|
100
|
+
beasties: beasties2,
|
|
102
101
|
config: { logger: { info: (msg) => {
|
|
103
102
|
parentPort.postMessage({ type: "log", args: [msg] });
|
|
104
103
|
} } },
|
|
@@ -1122,7 +1122,7 @@ async function buildServer(config, viteConfig, { ssrEntry, ssgOut, format, mock
|
|
|
1122
1122
|
}
|
|
1123
1123
|
function createProxy(options) {
|
|
1124
1124
|
const workerExt = options.format === "esm" ? ".mjs" : ".cjs";
|
|
1125
|
-
const workerProxy = new BuildWorkerProxy(new URL(`./build.worker${workerExt}`, (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/vite-ssg-optimized.
|
|
1125
|
+
const workerProxy = new BuildWorkerProxy(new URL(`./build.worker${workerExt}`, (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/vite-ssg-optimized.1efabb47.cjs', document.baseURI).href))), {
|
|
1126
1126
|
env: process__default.env,
|
|
1127
1127
|
workerData: options
|
|
1128
1128
|
});
|
|
@@ -1162,16 +1162,47 @@ async function build(ssgOptions = {}, viteConfig = {}) {
|
|
|
1162
1162
|
rootContainerId = "app"
|
|
1163
1163
|
} = Object.assign({}, config.ssgOptions || {}, ssgOptions);
|
|
1164
1164
|
const ssgOut = node_path.isAbsolute(_ssgOutDir) ? _ssgOutDir : node_path.join(root, _ssgOutDir);
|
|
1165
|
-
const
|
|
1166
|
-
console.log(`${kolorist.gray("[vite-ssg]")} ${kolorist.blue(`Using ${numberOfWorkers} workers`)}`);
|
|
1167
|
-
const workers = Array.from({ length: numberOfWorkers }, (_, index) => createProxy({
|
|
1165
|
+
const createProxyOptions = {
|
|
1168
1166
|
format,
|
|
1169
1167
|
out,
|
|
1170
1168
|
dirStyle,
|
|
1171
|
-
workerId: index,
|
|
1172
1169
|
viteConfig: {
|
|
1173
1170
|
configFile: config.configFile
|
|
1174
1171
|
}
|
|
1172
|
+
};
|
|
1173
|
+
let willRunBuild = true;
|
|
1174
|
+
if (fs__default.existsSync(ssgOut)) {
|
|
1175
|
+
willRunBuild = !ssgOptions["skip-build"];
|
|
1176
|
+
if (willRunBuild) {
|
|
1177
|
+
await fs__default.remove(ssgOut);
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
const buildPromises = [];
|
|
1181
|
+
if (willRunBuild) {
|
|
1182
|
+
const clientWorker = createProxy({
|
|
1183
|
+
...createProxyOptions,
|
|
1184
|
+
workerId: "client"
|
|
1185
|
+
});
|
|
1186
|
+
const cpBuildClient = execInWorker(clientWorker, buildClient, config, viteConfig).finally(() => clientWorker.terminate());
|
|
1187
|
+
buildPromises.push(cpBuildClient);
|
|
1188
|
+
}
|
|
1189
|
+
const ssrEntry = await resolveAlias(config, entry);
|
|
1190
|
+
if (willRunBuild) {
|
|
1191
|
+
const serverWorker = createProxy({
|
|
1192
|
+
...createProxyOptions,
|
|
1193
|
+
workerId: "server"
|
|
1194
|
+
});
|
|
1195
|
+
const cpBuildServer = execInWorker(serverWorker, buildServer, config, viteConfig, { ssrEntry, ssgOut, format, mock }).finally(() => serverWorker.terminate());
|
|
1196
|
+
buildPromises.push(cpBuildServer);
|
|
1197
|
+
}
|
|
1198
|
+
await Promise.all(buildPromises);
|
|
1199
|
+
const prefix = format === "esm" && process__default.platform === "win32" ? "file://" : "";
|
|
1200
|
+
const ext = format === "esm" ? ".mjs" : ".cjs";
|
|
1201
|
+
const numberOfWorkers = Math.max(1, _numberOfWorkers);
|
|
1202
|
+
console.log(`${kolorist.gray("[vite-ssg]")} ${kolorist.blue(`Using ${numberOfWorkers} workers`)}`);
|
|
1203
|
+
const workers = Array.from({ length: numberOfWorkers }, (_, index) => createProxy({
|
|
1204
|
+
...createProxyOptions,
|
|
1205
|
+
workerId: index
|
|
1175
1206
|
}));
|
|
1176
1207
|
const terminateWorkers = () => {
|
|
1177
1208
|
workers.splice(0, workers.length).forEach((worker) => worker.terminate());
|
|
@@ -1198,30 +1229,8 @@ async function build(ssgOptions = {}, viteConfig = {}) {
|
|
|
1198
1229
|
});
|
|
1199
1230
|
return worker;
|
|
1200
1231
|
};
|
|
1201
|
-
let willRunBuild = true;
|
|
1202
|
-
if (fs__default.existsSync(ssgOut)) {
|
|
1203
|
-
willRunBuild = !ssgOptions["skip-build"];
|
|
1204
|
-
if (willRunBuild) {
|
|
1205
|
-
await fs__default.remove(ssgOut);
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
const buildPromises = [];
|
|
1209
|
-
if (willRunBuild) {
|
|
1210
|
-
const clientWorker = await selectWorker(0);
|
|
1211
|
-
const cpBuildClient = execInWorker(clientWorker, buildClient, config, viteConfig);
|
|
1212
|
-
buildPromises.push(cpBuildClient);
|
|
1213
|
-
}
|
|
1214
|
-
const ssrEntry = await resolveAlias(config, entry);
|
|
1215
|
-
if (willRunBuild) {
|
|
1216
|
-
const serverWorker = await selectWorker(1);
|
|
1217
|
-
const cpBuildServer = execInWorker(serverWorker, buildServer, config, viteConfig, { ssrEntry, ssgOut, format, mock });
|
|
1218
|
-
buildPromises.push(cpBuildServer);
|
|
1219
|
-
}
|
|
1220
|
-
await Promise.all(buildPromises);
|
|
1221
|
-
const prefix = format === "esm" && process__default.platform === "win32" ? "file://" : "";
|
|
1222
|
-
const ext = format === "esm" ? ".mjs" : ".cjs";
|
|
1223
1232
|
const serverEntry = prefix + node_path.join(ssgOut, node_path.parse(ssrEntry).name + ext).replace(/\\/g, "/");
|
|
1224
|
-
const _require = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/vite-ssg-optimized.
|
|
1233
|
+
const _require = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/vite-ssg-optimized.1efabb47.cjs', document.baseURI).href)));
|
|
1225
1234
|
const { createApp, includedRoutes: serverEntryIncludedRoutes } = format === "esm" ? await import(serverEntry) : _require(serverEntry);
|
|
1226
1235
|
const includedRoutes = serverEntryIncludedRoutes || configIncludedRoutes;
|
|
1227
1236
|
const { routes } = await createApp(false);
|
|
@@ -1153,16 +1153,47 @@ async function build(ssgOptions = {}, viteConfig = {}) {
|
|
|
1153
1153
|
rootContainerId = "app"
|
|
1154
1154
|
} = Object.assign({}, config.ssgOptions || {}, ssgOptions);
|
|
1155
1155
|
const ssgOut = isAbsolute(_ssgOutDir) ? _ssgOutDir : join(root, _ssgOutDir);
|
|
1156
|
-
const
|
|
1157
|
-
console.log(`${gray("[vite-ssg]")} ${blue(`Using ${numberOfWorkers} workers`)}`);
|
|
1158
|
-
const workers = Array.from({ length: numberOfWorkers }, (_, index) => createProxy({
|
|
1156
|
+
const createProxyOptions = {
|
|
1159
1157
|
format,
|
|
1160
1158
|
out,
|
|
1161
1159
|
dirStyle,
|
|
1162
|
-
workerId: index,
|
|
1163
1160
|
viteConfig: {
|
|
1164
1161
|
configFile: config.configFile
|
|
1165
1162
|
}
|
|
1163
|
+
};
|
|
1164
|
+
let willRunBuild = true;
|
|
1165
|
+
if (fs.existsSync(ssgOut)) {
|
|
1166
|
+
willRunBuild = !ssgOptions["skip-build"];
|
|
1167
|
+
if (willRunBuild) {
|
|
1168
|
+
await fs.remove(ssgOut);
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
const buildPromises = [];
|
|
1172
|
+
if (willRunBuild) {
|
|
1173
|
+
const clientWorker = createProxy({
|
|
1174
|
+
...createProxyOptions,
|
|
1175
|
+
workerId: "client"
|
|
1176
|
+
});
|
|
1177
|
+
const cpBuildClient = execInWorker(clientWorker, buildClient, config, viteConfig).finally(() => clientWorker.terminate());
|
|
1178
|
+
buildPromises.push(cpBuildClient);
|
|
1179
|
+
}
|
|
1180
|
+
const ssrEntry = await resolveAlias(config, entry);
|
|
1181
|
+
if (willRunBuild) {
|
|
1182
|
+
const serverWorker = createProxy({
|
|
1183
|
+
...createProxyOptions,
|
|
1184
|
+
workerId: "server"
|
|
1185
|
+
});
|
|
1186
|
+
const cpBuildServer = execInWorker(serverWorker, buildServer, config, viteConfig, { ssrEntry, ssgOut, format, mock }).finally(() => serverWorker.terminate());
|
|
1187
|
+
buildPromises.push(cpBuildServer);
|
|
1188
|
+
}
|
|
1189
|
+
await Promise.all(buildPromises);
|
|
1190
|
+
const prefix = format === "esm" && process$1.platform === "win32" ? "file://" : "";
|
|
1191
|
+
const ext = format === "esm" ? ".mjs" : ".cjs";
|
|
1192
|
+
const numberOfWorkers = Math.max(1, _numberOfWorkers);
|
|
1193
|
+
console.log(`${gray("[vite-ssg]")} ${blue(`Using ${numberOfWorkers} workers`)}`);
|
|
1194
|
+
const workers = Array.from({ length: numberOfWorkers }, (_, index) => createProxy({
|
|
1195
|
+
...createProxyOptions,
|
|
1196
|
+
workerId: index
|
|
1166
1197
|
}));
|
|
1167
1198
|
const terminateWorkers = () => {
|
|
1168
1199
|
workers.splice(0, workers.length).forEach((worker) => worker.terminate());
|
|
@@ -1189,28 +1220,6 @@ async function build(ssgOptions = {}, viteConfig = {}) {
|
|
|
1189
1220
|
});
|
|
1190
1221
|
return worker;
|
|
1191
1222
|
};
|
|
1192
|
-
let willRunBuild = true;
|
|
1193
|
-
if (fs.existsSync(ssgOut)) {
|
|
1194
|
-
willRunBuild = !ssgOptions["skip-build"];
|
|
1195
|
-
if (willRunBuild) {
|
|
1196
|
-
await fs.remove(ssgOut);
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
const buildPromises = [];
|
|
1200
|
-
if (willRunBuild) {
|
|
1201
|
-
const clientWorker = await selectWorker(0);
|
|
1202
|
-
const cpBuildClient = execInWorker(clientWorker, buildClient, config, viteConfig);
|
|
1203
|
-
buildPromises.push(cpBuildClient);
|
|
1204
|
-
}
|
|
1205
|
-
const ssrEntry = await resolveAlias(config, entry);
|
|
1206
|
-
if (willRunBuild) {
|
|
1207
|
-
const serverWorker = await selectWorker(1);
|
|
1208
|
-
const cpBuildServer = execInWorker(serverWorker, buildServer, config, viteConfig, { ssrEntry, ssgOut, format, mock });
|
|
1209
|
-
buildPromises.push(cpBuildServer);
|
|
1210
|
-
}
|
|
1211
|
-
await Promise.all(buildPromises);
|
|
1212
|
-
const prefix = format === "esm" && process$1.platform === "win32" ? "file://" : "";
|
|
1213
|
-
const ext = format === "esm" ? ".mjs" : ".cjs";
|
|
1214
1223
|
const serverEntry = prefix + join(ssgOut, parse(ssrEntry).name + ext).replace(/\\/g, "/");
|
|
1215
1224
|
const _require = createRequire(import.meta.url);
|
|
1216
1225
|
const { createApp, includedRoutes: serverEntryIncludedRoutes } = format === "esm" ? await import(serverEntry) : _require(serverEntry);
|