@vue-solana/nuxt 0.6.4 → 0.6.5
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.cjs +20 -11
- package/dist/module.mjs +20 -11
- package/package.json +1 -1
package/dist/module.cjs
CHANGED
|
@@ -39,6 +39,7 @@ const VITE_OPTIMIZE_DEPS = [
|
|
|
39
39
|
"tweetnacl",
|
|
40
40
|
"tweetnacl/nacl-fast.js"
|
|
41
41
|
];
|
|
42
|
+
const VITE_NEEDS_INTEROP = ["eventemitter3", "tweetnacl", "tweetnacl/nacl-fast.js"];
|
|
42
43
|
const module$1 = kit.defineNuxtModule({
|
|
43
44
|
meta: {
|
|
44
45
|
name: "@vue-solana/nuxt",
|
|
@@ -58,17 +59,16 @@ const module$1 = kit.defineNuxtModule({
|
|
|
58
59
|
...typeof publicConfig.solana === "object" && publicConfig.solana !== null ? publicConfig.solana : {},
|
|
59
60
|
...toPublicSolanaConfig(options)
|
|
60
61
|
};
|
|
61
|
-
nuxt.options.vite
|
|
62
|
-
nuxt.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
);
|
|
62
|
+
mergeViteOptimizeDeps(nuxt.options.vite);
|
|
63
|
+
nuxt.hook("vite:extendConfig", (config, { isClient }) => {
|
|
64
|
+
if (!isClient) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
mergeViteOptimizeDeps(config);
|
|
68
|
+
if (config.environments?.client) {
|
|
69
|
+
mergeViteOptimizeDeps(config.environments.client);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
72
|
kit.addPlugin({
|
|
73
73
|
src: resolver.resolve("./runtime/plugin"),
|
|
74
74
|
mode: "client"
|
|
@@ -81,5 +81,14 @@ function toPublicSolanaConfig(options) {
|
|
|
81
81
|
delete runtimeOptions.wallet;
|
|
82
82
|
return runtimeOptions;
|
|
83
83
|
}
|
|
84
|
+
function mergeViteOptimizeDeps(target) {
|
|
85
|
+
target.optimizeDeps ??= {};
|
|
86
|
+
target.optimizeDeps.include = Array.from(
|
|
87
|
+
/* @__PURE__ */ new Set([...target.optimizeDeps.include ?? [], ...VITE_OPTIMIZE_DEPS])
|
|
88
|
+
);
|
|
89
|
+
target.optimizeDeps.needsInterop = Array.from(
|
|
90
|
+
/* @__PURE__ */ new Set([...target.optimizeDeps.needsInterop ?? [], ...VITE_NEEDS_INTEROP])
|
|
91
|
+
);
|
|
92
|
+
}
|
|
84
93
|
|
|
85
94
|
module.exports = module$1;
|
package/dist/module.mjs
CHANGED
|
@@ -36,6 +36,7 @@ const VITE_OPTIMIZE_DEPS = [
|
|
|
36
36
|
"tweetnacl",
|
|
37
37
|
"tweetnacl/nacl-fast.js"
|
|
38
38
|
];
|
|
39
|
+
const VITE_NEEDS_INTEROP = ["eventemitter3", "tweetnacl", "tweetnacl/nacl-fast.js"];
|
|
39
40
|
const module$1 = defineNuxtModule({
|
|
40
41
|
meta: {
|
|
41
42
|
name: "@vue-solana/nuxt",
|
|
@@ -55,17 +56,16 @@ const module$1 = defineNuxtModule({
|
|
|
55
56
|
...typeof publicConfig.solana === "object" && publicConfig.solana !== null ? publicConfig.solana : {},
|
|
56
57
|
...toPublicSolanaConfig(options)
|
|
57
58
|
};
|
|
58
|
-
nuxt.options.vite
|
|
59
|
-
nuxt.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
);
|
|
59
|
+
mergeViteOptimizeDeps(nuxt.options.vite);
|
|
60
|
+
nuxt.hook("vite:extendConfig", (config, { isClient }) => {
|
|
61
|
+
if (!isClient) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
mergeViteOptimizeDeps(config);
|
|
65
|
+
if (config.environments?.client) {
|
|
66
|
+
mergeViteOptimizeDeps(config.environments.client);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
69
|
addPlugin({
|
|
70
70
|
src: resolver.resolve("./runtime/plugin"),
|
|
71
71
|
mode: "client"
|
|
@@ -78,5 +78,14 @@ function toPublicSolanaConfig(options) {
|
|
|
78
78
|
delete runtimeOptions.wallet;
|
|
79
79
|
return runtimeOptions;
|
|
80
80
|
}
|
|
81
|
+
function mergeViteOptimizeDeps(target) {
|
|
82
|
+
target.optimizeDeps ??= {};
|
|
83
|
+
target.optimizeDeps.include = Array.from(
|
|
84
|
+
/* @__PURE__ */ new Set([...target.optimizeDeps.include ?? [], ...VITE_OPTIMIZE_DEPS])
|
|
85
|
+
);
|
|
86
|
+
target.optimizeDeps.needsInterop = Array.from(
|
|
87
|
+
/* @__PURE__ */ new Set([...target.optimizeDeps.needsInterop ?? [], ...VITE_NEEDS_INTEROP])
|
|
88
|
+
);
|
|
89
|
+
}
|
|
81
90
|
|
|
82
91
|
export { module$1 as default };
|