@hostlink/nuxt-light 1.10.7 → 1.10.8

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.8"
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");
@@ -80,6 +84,7 @@ const module = defineNuxtModule({
80
84
  config.optimizeDeps.exclude.push("quasar");
81
85
  config.define = {
82
86
  ...config.define,
87
+ __QUASAR_VERSION__: `'${quasarVersion}'`,
83
88
  __QUASAR_SSR__: false,
84
89
  __QUASAR_SSR_SERVER__: false,
85
90
  __QUASAR_SSR_CLIENT__: false,
@@ -89,6 +94,7 @@ const module = defineNuxtModule({
89
94
  nuxt.hook("nitro:config", async (config) => {
90
95
  config.replace = {
91
96
  ...config.replace,
97
+ __QUASAR_VERSION__: `'${quasarVersion}'`,
92
98
  __QUASAR_SSR__: false,
93
99
  __QUASAR_SSR_SERVER__: true,
94
100
  __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.8",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",