@dynect/base 0.9.0 → 0.10.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/module.ts +16 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynect/base",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Reusable Nuxt base module — components, composables, utils, plugins and i18n from the Dynect design system.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/module.ts CHANGED
@@ -78,25 +78,22 @@ export default defineNuxtModule<DynectBaseOptions>({
78
78
  // @/components/ui/* → runtime/components/ui/*
79
79
  // Must run BEFORE @ is resolved, so we use a regex alias in vite:extendConfig.
80
80
  // Only applied when the consuming app has no own components/ui directory.
81
- // if (isStandalone && !existsSync(join(srcDir, 'components', 'ui'))) {
82
- // const uiRuntimePath = join(runtimeComponentsDir, 'ui');
83
-
84
- // nuxt.hook('vite:extendConfig', (config) => {
85
- // config.resolve ??= {};
86
-
87
- // const entry = { find: /^[@~]\/components\/ui/, replacement: uiRuntimePath };
88
-
89
- // if (Array.isArray(config.resolve.alias)) {
90
- // (config.resolve.alias as any[]).unshift(entry);
91
- // } else {
92
- // const existing = config.resolve.alias ?? {};
93
- // config.resolve.alias = [
94
- // entry,
95
- // ...Object.entries(existing).map(([find, replacement]) => ({ find, replacement })),
96
- // ];
97
- // }
98
- // });
99
- // }
81
+ if (isStandalone && !existsSync(join(srcDir, 'components', 'ui'))) {
82
+ const uiRuntimePath = join(runtimeComponentsDir, 'ui');
83
+
84
+ nuxt.hook('vite:extendConfig', (config) => {
85
+ config.resolve ??= {};
86
+
87
+ const entry = { find: /^[@~]\/components\/ui/, replacement: uiRuntimePath };
88
+
89
+ if (Array.isArray(config.resolve.alias)) {
90
+ config.resolve.alias.unshift(entry);
91
+ } else {
92
+ const existing = config.resolve.alias ?? {};
93
+ config.resolve.alias = [entry, ...Object.entries(existing).map(([find, replacement]) => ({ find, replacement }))];
94
+ }
95
+ });
96
+ }
100
97
 
101
98
  // ── Install required Nuxt modules ────────────────────────────────────────
102
99
  if (options.shadcn !== false) {