@dyrected/nuxt 2.5.21 → 2.5.24

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/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@dyrected/nuxt",
3
3
  "configKey": "dyrected",
4
- "version": "2.5.21"
4
+ "version": "2.5.22"
5
5
  }
package/dist/module.mjs CHANGED
@@ -205,6 +205,21 @@ export default defineNitroPlugin(async (nitroApp) => {
205
205
  if (!nuxt.options.vite.optimizeDeps.exclude.includes("@dyrected/vue")) {
206
206
  nuxt.options.vite.optimizeDeps.exclude.push("@dyrected/vue");
207
207
  }
208
+ nuxt.options.vite.resolve = nuxt.options.vite.resolve || {};
209
+ nuxt.options.vite.resolve.dedupe = nuxt.options.vite.resolve.dedupe || [];
210
+ for (const dep of ["react", "react-dom"]) {
211
+ if (!nuxt.options.vite.resolve.dedupe.includes(dep)) {
212
+ nuxt.options.vite.resolve.dedupe.push(dep);
213
+ }
214
+ }
215
+ nuxt.options.vite.resolve.alias = nuxt.options.vite.resolve.alias || {};
216
+ try {
217
+ const reactMain = _require.resolve("react");
218
+ const reactDomMain = _require.resolve("react-dom");
219
+ nuxt.options.vite.resolve.alias.react = join(reactMain, "..");
220
+ nuxt.options.vite.resolve.alias["react-dom"] = join(reactDomMain, "..");
221
+ } catch {
222
+ }
208
223
  }
209
224
  nuxt.options.build.transpile.push("@dyrected/sdk", "@dyrected/vue", "@dyrected/admin");
210
225
  const optionsAny = nuxt.options;
@@ -2,6 +2,7 @@
2
2
  <DyrectedAdmin
3
3
  :config="config"
4
4
  :basename="basename || '/cms-admin'"
5
+ :components="components"
5
6
  />
6
7
  </template>
7
8
 
@@ -16,6 +17,10 @@ defineProps<{
16
17
  * @default "/cms-admin"
17
18
  */
18
19
  basename?: string;
20
+ /**
21
+ * Custom components to inject into the Admin UI.
22
+ */
23
+ components?: any;
19
24
  }>();
20
25
 
21
26
  const runtimeConfig = useRuntimeConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyrected/nuxt",
3
- "version": "2.5.21",
3
+ "version": "2.5.24",
4
4
  "type": "module",
5
5
  "main": "./dist/module.mjs",
6
6
  "types": "./dist/module.d.ts",
@@ -10,10 +10,10 @@
10
10
  "dependencies": {
11
11
  "@nuxt/kit": "^3.11.2",
12
12
  "h3": "^1.15.0",
13
- "@dyrected/core": "2.5.21",
14
- "@dyrected/sdk": "2.5.21",
15
- "@dyrected/vue": "2.5.21",
16
- "@dyrected/admin": "2.5.21"
13
+ "@dyrected/core": "2.5.24",
14
+ "@dyrected/sdk": "2.5.24",
15
+ "@dyrected/admin": "2.5.24",
16
+ "@dyrected/vue": "2.5.24"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "nuxt": "^3.0.0",