@model-w/preset-nuxt3 1.0.5 → 2.0.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.
- package/index.ts +9 -7
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -235,8 +235,10 @@ export function defineModelWConfig(
|
|
|
235
235
|
});
|
|
236
236
|
const apiUrl =
|
|
237
237
|
config.apiUrl ||
|
|
238
|
-
env.get({ name: "
|
|
238
|
+
env.get({ name: "NUXT_API_URL", buildDefault: "http://localhost" });
|
|
239
239
|
|
|
240
|
+
const proxyTarget = config.apiUrl ||
|
|
241
|
+
env.get({ name: "NUXT_PROXY_OPTIONS_TARGET", buildDefault: "http://localhost" });
|
|
240
242
|
const backAlias = config.backAlias || "back";
|
|
241
243
|
const cmsAlias = config.cmsAlias || "wubba-lubba-dub-dub";
|
|
242
244
|
|
|
@@ -248,11 +250,11 @@ export function defineModelWConfig(
|
|
|
248
250
|
);
|
|
249
251
|
|
|
250
252
|
const sentryDsn =
|
|
251
|
-
config.sentryDsn || env.get({ name: "
|
|
252
|
-
const
|
|
253
|
+
config.sentryDsn || env.get({ name: "NUXT_PUBLIC_SENTRY_DSN", defaultValue: "" });
|
|
254
|
+
const sentryEnvironment =
|
|
253
255
|
config.environment ||
|
|
254
256
|
env.get({
|
|
255
|
-
name: "
|
|
257
|
+
name: "NUXT_PUBLIC_SENTRY_ENVIRONMENT",
|
|
256
258
|
defaultValue: sentryDsn ? undefined : "",
|
|
257
259
|
});
|
|
258
260
|
|
|
@@ -264,12 +266,12 @@ export function defineModelWConfig(
|
|
|
264
266
|
runtimeConfig: defu(config.runtimeConfig || {}, {
|
|
265
267
|
apiUrl,
|
|
266
268
|
proxy: {
|
|
267
|
-
options: { target:
|
|
269
|
+
options: { target: proxyTarget },
|
|
268
270
|
},
|
|
269
271
|
public: {
|
|
270
272
|
sentry: {
|
|
271
273
|
dsn: sentryDsn,
|
|
272
|
-
environment,
|
|
274
|
+
environment: sentryEnvironment,
|
|
273
275
|
},
|
|
274
276
|
},
|
|
275
277
|
}),
|
|
@@ -306,7 +308,7 @@ export function defineModelWConfig(
|
|
|
306
308
|
|
|
307
309
|
sentry: {
|
|
308
310
|
dsn: sentryDsn,
|
|
309
|
-
environment:
|
|
311
|
+
environment: sentryEnvironment,
|
|
310
312
|
} as SentryOptions,
|
|
311
313
|
|
|
312
314
|
modules: [
|