@vizejs/nuxt 0.501.0 → 0.502.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/dist/index.d.mts +4 -0
- package/dist/index.mjs +19 -6
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -816,7 +816,7 @@ function buildNuxtCompilerOptions(rootDir, baseURL = "/", buildAssetsDir = "/_nu
|
|
|
816
816
|
devUrlBase: buildNuxtDevAssetBase(baseURL, buildAssetsDir),
|
|
817
817
|
handleNodeModulesVue: true,
|
|
818
818
|
root: rootDir,
|
|
819
|
-
scanPatterns: []
|
|
819
|
+
scanPatterns: ["**/*.vue"]
|
|
820
820
|
};
|
|
821
821
|
if (overrides.customRenderer === true && overrides.exclude !== void 0) defaults.exclude = overrides.exclude;
|
|
822
822
|
else if (overrides.customRenderer !== true) defaults.exclude = mergeNuxtCompilerPatterns(NUXT_OG_IMAGE_RENDERER_SFC_EXCLUDE, overrides.exclude);
|
|
@@ -1135,20 +1135,33 @@ const DEFAULT_NUXT_BRIDGE_OPTIONS = {
|
|
|
1135
1135
|
};
|
|
1136
1136
|
const DEFAULT_NUXT_UNOCSS_OPTIONS = { originalSource: {} };
|
|
1137
1137
|
const DEFAULT_NUXT_DEV_OPTIONS = { stylesheetLinks: true };
|
|
1138
|
-
function resolveNuxtBridgeOptions(bridge) {
|
|
1139
|
-
|
|
1138
|
+
function resolveNuxtBridgeOptions(bridge, host) {
|
|
1139
|
+
let resolved;
|
|
1140
|
+
if (bridge === false) resolved = {
|
|
1140
1141
|
autoImports: false,
|
|
1141
1142
|
components: false,
|
|
1142
1143
|
i18n: false,
|
|
1143
1144
|
stableInjectedKeys: false
|
|
1144
1145
|
};
|
|
1145
|
-
if (bridge === true || bridge == null)
|
|
1146
|
-
|
|
1146
|
+
else if (bridge === true || bridge == null) resolved = { ...DEFAULT_NUXT_BRIDGE_OPTIONS };
|
|
1147
|
+
else resolved = {
|
|
1147
1148
|
autoImports: bridge.autoImports ?? DEFAULT_NUXT_BRIDGE_OPTIONS.autoImports,
|
|
1148
1149
|
components: bridge.components ?? DEFAULT_NUXT_BRIDGE_OPTIONS.components,
|
|
1149
1150
|
i18n: bridge.i18n ?? DEFAULT_NUXT_BRIDGE_OPTIONS.i18n,
|
|
1150
1151
|
stableInjectedKeys: bridge.stableInjectedKeys ?? DEFAULT_NUXT_BRIDGE_OPTIONS.stableInjectedKeys
|
|
1151
1152
|
};
|
|
1153
|
+
if (!host) return resolved;
|
|
1154
|
+
const autoImports = host.imports !== false && host.imports?.autoImport !== false;
|
|
1155
|
+
const hasI18n = host._requiredModules?.["@nuxtjs/i18n"] === true || host.modules?.some((entry) => {
|
|
1156
|
+
const module = Array.isArray(entry) ? entry[0] : entry;
|
|
1157
|
+
return typeof module === "string" && /^@nuxtjs\/i18n(?:\/|$)/.test(module);
|
|
1158
|
+
}) === true;
|
|
1159
|
+
return {
|
|
1160
|
+
autoImports: resolved.autoImports && autoImports,
|
|
1161
|
+
components: resolved.components && host.components !== false,
|
|
1162
|
+
i18n: resolved.i18n && hasI18n,
|
|
1163
|
+
stableInjectedKeys: resolved.stableInjectedKeys && autoImports
|
|
1164
|
+
};
|
|
1152
1165
|
}
|
|
1153
1166
|
function resolveNuxtUnoCssOptions(unocss) {
|
|
1154
1167
|
if (unocss === false) return false;
|
|
@@ -1434,7 +1447,7 @@ async function setupVizeNuxtModule(options, nuxt) {
|
|
|
1434
1447
|
const supportsViteCompiler = hasNuxtViteCompilerSupport(nuxtWithBuilderOptions);
|
|
1435
1448
|
const appBaseURL = getNuxtAppBaseURL(nuxtWithBuilderOptions);
|
|
1436
1449
|
const buildAssetsDir = getNuxtBuildAssetsDir(nuxtWithBuilderOptions);
|
|
1437
|
-
const bridgeOptions = resolveNuxtBridgeOptions(options.bridge);
|
|
1450
|
+
const bridgeOptions = resolveNuxtBridgeOptions(options.bridge, nuxt.options);
|
|
1438
1451
|
const devOptions = resolveNuxtDevOptions(options.dev);
|
|
1439
1452
|
const museaOptions = detectedNuxtMajor === 2 ? false : resolveNuxtMuseaOptions(options.musea);
|
|
1440
1453
|
const unocssOptions = resolveNuxtUnoCssOptions(options.unocss);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.502.0",
|
|
4
4
|
"description": "Nuxt module for Vize - compiler, musea gallery, linter, and type checker",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@nuxt/kit": "3.11.2",
|
|
52
|
-
"@vizejs/native": "0.
|
|
53
|
-
"@vizejs/nuxt-lint-config": "0.
|
|
54
|
-
"@vizejs/vite-plugin": "0.
|
|
55
|
-
"@vizejs/vite-plugin-musea": "0.
|
|
56
|
-
"oxlint-plugin-vize": "0.
|
|
57
|
-
"vize": "0.
|
|
52
|
+
"@vizejs/native": "0.502.0",
|
|
53
|
+
"@vizejs/nuxt-lint-config": "0.502.0",
|
|
54
|
+
"@vizejs/vite-plugin": "0.502.0",
|
|
55
|
+
"@vizejs/vite-plugin-musea": "0.502.0",
|
|
56
|
+
"oxlint-plugin-vize": "0.502.0",
|
|
57
|
+
"vize": "0.502.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"jiti-nuxt2": "npm:jiti@1.21.7",
|