@dyrected/nuxt 2.3.6 → 2.3.8
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 +1 -1
- package/dist/module.mjs +8 -1
- package/dist/runtime/server/handler.mjs +3 -4
- package/package.json +6 -6
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -100,8 +100,14 @@ const module = defineNuxtModule({
|
|
|
100
100
|
siteId: process.env.NUXT_PUBLIC_DYRECTED_SITE_ID || options.siteId || "default"
|
|
101
101
|
};
|
|
102
102
|
if (nuxt.options.vite) {
|
|
103
|
-
nuxt.options.vite = nuxt.options.vite || {};
|
|
104
103
|
nuxt.options.vite.optimizeDeps = nuxt.options.vite.optimizeDeps || {};
|
|
104
|
+
nuxt.options.vite.optimizeDeps.include = nuxt.options.vite.optimizeDeps.include || [];
|
|
105
|
+
const toInclude = ["react", "react-dom", "react-router-dom", "@tanstack/react-query", "qs"];
|
|
106
|
+
for (const dep of toInclude) {
|
|
107
|
+
if (!nuxt.options.vite.optimizeDeps.include.includes(dep)) {
|
|
108
|
+
nuxt.options.vite.optimizeDeps.include.push(dep);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
105
111
|
nuxt.options.vite.optimizeDeps.exclude = nuxt.options.vite.optimizeDeps.exclude || [];
|
|
106
112
|
if (!nuxt.options.vite.optimizeDeps.exclude.includes("@dyrected/admin")) {
|
|
107
113
|
nuxt.options.vite.optimizeDeps.exclude.push("@dyrected/admin");
|
|
@@ -110,6 +116,7 @@ const module = defineNuxtModule({
|
|
|
110
116
|
nuxt.options.vite.optimizeDeps.exclude.push("@dyrected/vue");
|
|
111
117
|
}
|
|
112
118
|
}
|
|
119
|
+
nuxt.options.build.transpile.push("@dyrected/sdk", "@dyrected/vue", "@dyrected/admin");
|
|
113
120
|
nuxt.hook("vite:extendConfig", (config) => {
|
|
114
121
|
const plugins = config.plugins ?? [];
|
|
115
122
|
const unctxPlugin = plugins.find((p) => p && typeof p === "object" && p.name === "unctx:transform");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineEventHandler } from "h3";
|
|
1
|
+
import { defineEventHandler, getRequestURL } from "h3";
|
|
2
2
|
import { createDyrectedApp } from "@dyrected/core/server";
|
|
3
3
|
import { useRuntimeConfig } from "#imports";
|
|
4
4
|
let app;
|
|
@@ -33,9 +33,8 @@ export default defineEventHandler(async (event) => {
|
|
|
33
33
|
const originalUrl = req?.url || "/";
|
|
34
34
|
const apiBase = config.apiBase || "/dyrected";
|
|
35
35
|
const path = originalUrl.startsWith(apiBase) ? originalUrl.slice(apiBase.length) || "/" : originalUrl;
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const fullUrl = new URL(path, `${protocol}://${host}`);
|
|
36
|
+
const url = getRequestURL(event);
|
|
37
|
+
const fullUrl = new URL(path, url.origin);
|
|
39
38
|
let body = void 0;
|
|
40
39
|
if (!["GET", "HEAD"].includes(method)) {
|
|
41
40
|
if (req && typeof req.on === "function") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dyrected/nuxt",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.8",
|
|
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/
|
|
14
|
-
"@dyrected/
|
|
15
|
-
"@dyrected/
|
|
16
|
-
"@dyrected/
|
|
13
|
+
"@dyrected/admin": "2.5.2",
|
|
14
|
+
"@dyrected/core": "2.5.1",
|
|
15
|
+
"@dyrected/sdk": "2.4.5",
|
|
16
|
+
"@dyrected/vue": "2.5.4"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"nuxt": "^3.0.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"homepage": "https://dyrected.com",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/
|
|
35
|
+
"url": "git+https://github.com/Dyrected/dyrected.git"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|