create-portfoliable 1.2.17 → 1.2.18

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.
@@ -28,6 +28,14 @@ import {
28
28
  } from '../scripts/terminal-ui.mjs';
29
29
  import { resolveConsumerRuntimeAliases } from '../scripts/consumer-runtime-aliases.mjs';
30
30
 
31
+ function resolveMermaidDevAliases(runtimeAliases) {
32
+ return [
33
+ ...runtimeAliases,
34
+ { find: /^dayjs$/, replacement: path.resolve(process.cwd(), 'node_modules/dayjs/esm/index.js') },
35
+ { find: 'dayjs/dayjs.min.js', replacement: path.resolve(process.cwd(), 'node_modules/dayjs/esm/index.js') }
36
+ ];
37
+ }
38
+
31
39
  // MARK: TERMINAL STYLES
32
40
  // ANSI color code used for success-status text.
33
41
  const green = '\x1b[32m';
@@ -595,13 +603,13 @@ async function runDevServer(flags, options = {}) {
595
603
  }
596
604
 
597
605
  const runtimeAliases = resolveConsumerRuntimeAliases(process.cwd());
606
+ const mermaidDevAliases = resolveMermaidDevAliases(runtimeAliases);
598
607
 
599
608
  // Creates Vite development server instance.
600
609
  const server = await createServer({
601
- resolve: runtimeAliases.length > 0
602
- ? { alias: runtimeAliases }
603
- : undefined,
610
+ resolve: { alias: mermaidDevAliases },
604
611
  optimizeDeps: {
612
+ include: ['mermaid', 'mermaid > dayjs'],
605
613
  exclude: ['create-portfoliable']
606
614
  },
607
615
  server: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-portfoliable",
3
- "version": "1.2.17",
3
+ "version": "1.2.18",
4
4
  "description": "Unified Portfoliable package with initializer and runtime CLI",
5
5
  "private": false,
6
6
  "type": "module",
package/vite.config.js CHANGED
@@ -94,8 +94,8 @@ export default defineConfig(({ command }) => {
94
94
  ? { alias: runtimeAliases }
95
95
  : undefined,
96
96
 
97
- // In local-link mode, avoid prebundling Valence so edits in the linked package
98
- // are reflected immediately during development.
97
+ // Keep Mermaid's CommonJS dependencies in Vite's normalized dev graph while
98
+ // avoiding prebundling Valence so linked-package edits remain observable.
99
99
  optimizeDeps: (command === 'serve' && usingLocalValence)
100
100
  ? { exclude: ['@portfoliablejs/valence'] }
101
101
  : undefined,