@merkaly/nuxt 0.1.8 → 0.1.10
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 +3 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addPlugin, addRouteMiddleware, addImportsDir, addComponentsDir } from '@nuxt/kit';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
|
+
import svgLoader from 'vite-svg-loader';
|
|
3
4
|
|
|
4
5
|
function isPlainObject(value) {
|
|
5
6
|
if (value === null || typeof value !== "object") {
|
|
@@ -102,7 +103,7 @@ const module = defineNuxtModule({
|
|
|
102
103
|
const bootstrapConfigPath = rootResolver.resolve("bootstrap.config.ts");
|
|
103
104
|
let BootstrapConfig;
|
|
104
105
|
if (existsSync(bootstrapConfigPath)) {
|
|
105
|
-
|
|
106
|
+
await import(bootstrapConfigPath).then((result) => BootstrapConfig = result.default).catch(() => BootstrapConfig = {});
|
|
106
107
|
}
|
|
107
108
|
if (!BootstrapConfig) {
|
|
108
109
|
BootstrapConfig = {};
|
|
@@ -121,7 +122,7 @@ const module = defineNuxtModule({
|
|
|
121
122
|
path: moduleResolver.resolve("./runtime/components"),
|
|
122
123
|
prefix: "MK"
|
|
123
124
|
});
|
|
124
|
-
nuxt.options["vite"] = defu(nuxt.options["vite"] || {}, { plugins: [
|
|
125
|
+
nuxt.options["vite"] = defu(nuxt.options["vite"] || {}, { plugins: [svgLoader()] });
|
|
125
126
|
}
|
|
126
127
|
});
|
|
127
128
|
|