@hostlink/nuxt-light 1.10.7 → 1.10.9

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.10.7"
4
+ "version": "1.10.9"
5
5
  }
package/dist/module.mjs CHANGED
@@ -1,5 +1,7 @@
1
- import { defineNuxtModule, createResolver, addComponentsDir, addImports, addVitePlugin, resolveFiles, addPlugin } from '@nuxt/kit';
1
+ import { dirname } from 'node:path';
2
+ import { defineNuxtModule, createResolver, resolvePath, addComponentsDir, addImports, addVitePlugin, resolveFiles, addPlugin } from '@nuxt/kit';
2
3
  import { quasar } from '@quasar/vite-plugin';
4
+ import { readFile } from 'node:fs/promises';
3
5
 
4
6
  const module = defineNuxtModule({
5
7
  meta: {
@@ -10,6 +12,8 @@ const module = defineNuxtModule({
10
12
  defaults: {},
11
13
  async setup(options, nuxt) {
12
14
  const resolver = createResolver(import.meta.url);
15
+ const { resolve: resolveQuasar } = createResolver(dirname(await resolvePath("quasar/package.json")));
16
+ const { version: quasarVersion } = JSON.parse(await readFile(resolveQuasar("package.json"), "utf-8"));
13
17
  nuxt.options.css.push("quasar/dist/quasar.prod.css");
14
18
  nuxt.options.css.push("@quasar/extras/material-icons/material-icons.css");
15
19
  nuxt.options.css.push("@quasar/extras/material-icons-outlined/material-icons-outlined.css");
@@ -57,7 +61,10 @@ const module = defineNuxtModule({
57
61
  { name: "LightModelField", from, type: true },
58
62
  { name: "LightModel", from, type: true }
59
63
  ]);
60
- addVitePlugin(quasar());
64
+ addVitePlugin(quasar({
65
+ runMode: "ssr-client",
66
+ devTreeshaking: true
67
+ }));
61
68
  const files = await resolveFiles(process.cwd() + "/models", ["*"]);
62
69
  nuxt.options.runtimeConfig.public.light = {
63
70
  model: []
@@ -80,6 +87,7 @@ const module = defineNuxtModule({
80
87
  config.optimizeDeps.exclude.push("quasar");
81
88
  config.define = {
82
89
  ...config.define,
90
+ __QUASAR_VERSION__: `'${quasarVersion}'`,
83
91
  __QUASAR_SSR__: false,
84
92
  __QUASAR_SSR_SERVER__: false,
85
93
  __QUASAR_SSR_CLIENT__: false,
@@ -89,6 +97,7 @@ const module = defineNuxtModule({
89
97
  nuxt.hook("nitro:config", async (config) => {
90
98
  config.replace = {
91
99
  ...config.replace,
100
+ __QUASAR_VERSION__: `'${quasarVersion}'`,
92
101
  __QUASAR_SSR__: false,
93
102
  __QUASAR_SSR_SERVER__: true,
94
103
  __QUASAR_SSR_CLIENT__: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.10.7",
3
+ "version": "1.10.9",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",