@pinegrow/nuxt-module 3.0.29 → 3.0.30
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 +20 -4
- package/package.json +2 -2
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -5,6 +5,8 @@ const module = defineNuxtModule({
|
|
|
5
5
|
if (moduleOptions.liveDesigner) {
|
|
6
6
|
const nuxtInstance = nuxt;
|
|
7
7
|
let pluginInstance;
|
|
8
|
+
let customOptions;
|
|
9
|
+
const components = [];
|
|
8
10
|
const { resolve } = createResolver(import.meta.url);
|
|
9
11
|
addServerPlugin(resolve("./runtime/nitro-plugin.mjs"));
|
|
10
12
|
nuxt.hook("listen", async (listenerServer, listener) => {
|
|
@@ -14,7 +16,7 @@ const module = defineNuxtModule({
|
|
|
14
16
|
const filterConfig = (config) => {
|
|
15
17
|
const {
|
|
16
18
|
dir,
|
|
17
|
-
components,
|
|
19
|
+
components: components2,
|
|
18
20
|
rootDir,
|
|
19
21
|
srcDir,
|
|
20
22
|
css,
|
|
@@ -29,7 +31,7 @@ const module = defineNuxtModule({
|
|
|
29
31
|
} = config;
|
|
30
32
|
return {
|
|
31
33
|
dir,
|
|
32
|
-
components,
|
|
34
|
+
components: components2,
|
|
33
35
|
rootDir,
|
|
34
36
|
srcDir,
|
|
35
37
|
css,
|
|
@@ -43,7 +45,7 @@ const module = defineNuxtModule({
|
|
|
43
45
|
ignorePrefix
|
|
44
46
|
};
|
|
45
47
|
};
|
|
46
|
-
|
|
48
|
+
customOptions = {
|
|
47
49
|
...moduleOptions.liveDesigner,
|
|
48
50
|
listenerServer,
|
|
49
51
|
nuxtInstance,
|
|
@@ -61,7 +63,8 @@ const module = defineNuxtModule({
|
|
|
61
63
|
};
|
|
62
64
|
})
|
|
63
65
|
}
|
|
64
|
-
}
|
|
66
|
+
};
|
|
67
|
+
pluginInstance = liveDesigner(customOptions);
|
|
65
68
|
addVitePlugin(pluginInstance);
|
|
66
69
|
} catch (err) {
|
|
67
70
|
console.log(err);
|
|
@@ -70,6 +73,19 @@ const module = defineNuxtModule({
|
|
|
70
73
|
);
|
|
71
74
|
}
|
|
72
75
|
});
|
|
76
|
+
nuxt.hook("components:extend", (v) => {
|
|
77
|
+
components.length = 0;
|
|
78
|
+
components.push(...v);
|
|
79
|
+
components.sort((a, b) => a.pascalName.localeCompare(b.pascalName));
|
|
80
|
+
try {
|
|
81
|
+
customOptions.additionalConfig.components.list = components;
|
|
82
|
+
} catch (err) {
|
|
83
|
+
console.log(err);
|
|
84
|
+
console.log(
|
|
85
|
+
"Pinegrow: @pinegrow/nuxt-module was unable to load @pinegrow/vite-plugin live-designer!"
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
73
89
|
}
|
|
74
90
|
},
|
|
75
91
|
meta: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinegrow/nuxt-module",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.30",
|
|
4
4
|
"description": "Pinegrow Nuxt Module",
|
|
5
5
|
"author": "Pinegrow (http://pinegrow.com/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@nuxt/kit": "latest",
|
|
45
|
-
"@pinegrow/vite-plugin": "3.0.
|
|
45
|
+
"@pinegrow/vite-plugin": "3.0.30"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@nuxt/module-builder": "latest",
|