vitrify 0.2.2 → 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 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,8 +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('fastify-ssr-plugin')) {
309
- return 'fastify-ssr-plugin';
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;
310
314
  }
311
315
  else if (id.includes('node_modules')) {
312
316
  return 'vendor';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitrify",
3
- "version": "0.2.2",
3
+ "version": "0.2.5",
4
4
  "license": "MIT",
5
5
  "author": "Stefan van Herwijnen",
6
6
  "description": "Pre-configured Vite CLI for your framework",
@@ -71,6 +71,7 @@
71
71
  "middie": "^6.0.0",
72
72
  "readline": "^1.3.0",
73
73
  "sass": "1.50.0",
74
+ "unplugin-vue-components": "^0.19.3",
74
75
  "vite": "^2.9.5",
75
76
  "vitest": "^0.9.3"
76
77
  },
@@ -83,7 +84,6 @@
83
84
  "quasar": "^2.6.6",
84
85
  "rollup": "^2.70.1",
85
86
  "typescript": "^4.6.3",
86
- "unplugin-vue-components": "^0.19.3",
87
87
  "vite": "^2.9.5",
88
88
  "vue": "^3.2.33",
89
89
  "vue-router": "^4.0.14"
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,8 +364,10 @@ export const baseConfig = async ({
362
364
  chunkFileNames: '[name].mjs',
363
365
  format: 'es',
364
366
  manualChunks: (id) => {
365
- if (id.includes('fastify-ssr-plugin')) {
366
- return 'fastify-ssr-plugin'
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
367
371
  } else if (id.includes('node_modules')) {
368
372
  return 'vendor'
369
373
  }