vitrify 0.2.4 → 0.2.5
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.js +6 -5
- package/package.json +1 -1
- package/src/node/index.ts +6 -4
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const serverModules = ['fastify', 'middie'];
|
|
|
8
8
|
const configPluginMap = {
|
|
9
9
|
quasar: () => import('./plugins/quasar.js').then((module) => module.QuasarPlugin)
|
|
10
10
|
};
|
|
11
|
+
const manualChunks = ['prerender', 'fastify-ssr-plugin', 'server'];
|
|
11
12
|
export const VIRTUAL_MODULES = [
|
|
12
13
|
'virtual:fastify-setup',
|
|
13
14
|
'virtual:boot-functions',
|
|
@@ -305,11 +306,11 @@ export const baseConfig = async ({ ssr, appDir, publicDir, command = 'build', mo
|
|
|
305
306
|
chunkFileNames: '[name].mjs',
|
|
306
307
|
format: 'es',
|
|
307
308
|
manualChunks: (id) => {
|
|
308
|
-
if (id.includes('
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
309
|
+
if (id.includes('vitrify/src/vite/')) {
|
|
310
|
+
const name = id.split('/').at(-1)?.split('.').at(0);
|
|
311
|
+
console.log(name);
|
|
312
|
+
if (manualChunks.includes(id))
|
|
313
|
+
return name;
|
|
313
314
|
}
|
|
314
315
|
else if (id.includes('node_modules')) {
|
|
315
316
|
return 'vendor';
|
package/package.json
CHANGED
package/src/node/index.ts
CHANGED
|
@@ -24,6 +24,8 @@ const configPluginMap: Record<string, () => Promise<VitrifyPlugin>> = {
|
|
|
24
24
|
import('./plugins/quasar.js').then((module) => module.QuasarPlugin)
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
const manualChunks = ['prerender', 'fastify-ssr-plugin', 'server']
|
|
28
|
+
|
|
27
29
|
export const VIRTUAL_MODULES = [
|
|
28
30
|
'virtual:fastify-setup',
|
|
29
31
|
'virtual:boot-functions',
|
|
@@ -362,10 +364,10 @@ export const baseConfig = async ({
|
|
|
362
364
|
chunkFileNames: '[name].mjs',
|
|
363
365
|
format: 'es',
|
|
364
366
|
manualChunks: (id) => {
|
|
365
|
-
if (id.includes('
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
return
|
|
367
|
+
if (id.includes('vitrify/src/vite/')) {
|
|
368
|
+
const name = id.split('/').at(-1)?.split('.').at(0)
|
|
369
|
+
console.log(name)
|
|
370
|
+
if (manualChunks.includes(id)) return name
|
|
369
371
|
} else if (id.includes('node_modules')) {
|
|
370
372
|
return 'vendor'
|
|
371
373
|
}
|