vitrify 0.10.3 → 0.10.4
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.
|
@@ -3,7 +3,7 @@ import { routesToPaths } from '../../helpers/routes.js';
|
|
|
3
3
|
export const prerender = async ({ outDir, templatePath, manifestPath, entryServerPath, onRendered }) => {
|
|
4
4
|
const promises = [];
|
|
5
5
|
const template = (await fs.readFile(templatePath)).toString();
|
|
6
|
-
const manifest = await fs.readFile(manifestPath);
|
|
6
|
+
const manifest = JSON.parse((await fs.readFile(manifestPath)).toString());
|
|
7
7
|
const { render, getRoutes } = await import(entryServerPath);
|
|
8
8
|
const routes = await getRoutes();
|
|
9
9
|
const paths = routesToPaths(routes).filter((i) => !i.includes(':') && !i.includes('*'));
|
package/dist/index.js
CHANGED
|
@@ -234,7 +234,7 @@ export const baseConfig = async ({ ssr, appDir, publicDir, base = '/', command =
|
|
|
234
234
|
return;
|
|
235
235
|
},
|
|
236
236
|
transform: (code, id) => {
|
|
237
|
-
if (id.
|
|
237
|
+
if (id.includes('main.ts') && id.includes('vitrify')) {
|
|
238
238
|
code =
|
|
239
239
|
`${globalCss.map((css) => `import '${css}'`).join('\n')}\n` + code;
|
|
240
240
|
}
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export const prerender = async ({
|
|
|
17
17
|
}) => {
|
|
18
18
|
const promises = []
|
|
19
19
|
const template = (await fs.readFile(templatePath)).toString()
|
|
20
|
-
const manifest = await fs.readFile(manifestPath)
|
|
20
|
+
const manifest = JSON.parse((await fs.readFile(manifestPath)).toString())
|
|
21
21
|
const { render, getRoutes } = await import(entryServerPath)
|
|
22
22
|
const routes = await getRoutes()
|
|
23
23
|
const paths = routesToPaths(routes).filter(
|
package/src/node/index.ts
CHANGED
|
@@ -304,7 +304,7 @@ export const baseConfig = async ({
|
|
|
304
304
|
return
|
|
305
305
|
},
|
|
306
306
|
transform: (code, id) => {
|
|
307
|
-
if (id.
|
|
307
|
+
if (id.includes('main.ts') && id.includes('vitrify')) {
|
|
308
308
|
code =
|
|
309
309
|
`${globalCss.map((css) => `import '${css}'`).join('\n')}\n` + code
|
|
310
310
|
}
|