@unocss/nuxt 0.9.2 → 0.9.3

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/README.md CHANGED
@@ -23,7 +23,10 @@ npm i -g @unocss/nuxt
23
23
  export default {
24
24
  buildModules: [
25
25
  '@unocss/nuxt'
26
- ]
26
+ ],
27
+ unocss: {
28
+ // options
29
+ }
27
30
  }
28
31
  ```
29
32
 
package/dist/index.d.ts CHANGED
@@ -5,11 +5,17 @@ import { IconsOptions } from '@unocss/preset-icons';
5
5
 
6
6
  interface UnocssNuxtOptions extends UserConfig {
7
7
  /**
8
- * Injecting `uno.css` entry automatically
8
+ * Injecting `uno.css` entry
9
9
  *
10
10
  * @default true
11
11
  */
12
12
  autoImport?: boolean;
13
+ /**
14
+ * Injecting `@unocss/reset/tailwind.css` entry
15
+ *
16
+ * @default false
17
+ */
18
+ preflight?: boolean;
13
19
  /**
14
20
  * Installing UnoCSS components
15
21
  * - `<UnoIcon>`
@@ -39,7 +45,7 @@ interface UnocssNuxtOptions extends UserConfig {
39
45
  declare const _default: _nuxt_kit.LegacyNuxtModule;
40
46
 
41
47
  declare module '@nuxt/kit' {
42
- interface NuxtOptions {
48
+ interface ConfigSchema {
43
49
  unocss?: UnocssNuxtOptions;
44
50
  }
45
51
  }
package/dist/index.mjs CHANGED
@@ -30,7 +30,15 @@ var src_default = defineNuxtModule({
30
30
  addPluginTemplate({
31
31
  filename: "unocss.mjs",
32
32
  src: "",
33
- getContents: () => "import 'uno.css';export default () => {};"
33
+ getContents: () => {
34
+ const lines = [
35
+ "import 'uno.css'",
36
+ "export default () => {};"
37
+ ];
38
+ if (options.preflight)
39
+ lines.unshift("import '@unocss/reset/tailwind.css'");
40
+ return lines.join("\n");
41
+ }
34
42
  });
35
43
  }
36
44
  if (options.components) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/nuxt",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Nuxt module for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -36,12 +36,13 @@
36
36
  "runtime"
37
37
  ],
38
38
  "dependencies": {
39
- "@unocss/core": "0.9.2",
40
- "@unocss/webpack": "0.9.2",
41
- "@unocss/vite": "0.9.2",
42
- "@unocss/preset-uno": "0.9.2",
43
- "@unocss/preset-attributify": "0.9.2",
44
- "@unocss/preset-icons": "0.9.2",
39
+ "@unocss/core": "0.9.3",
40
+ "@unocss/webpack": "0.9.3",
41
+ "@unocss/vite": "0.9.3",
42
+ "@unocss/reset": "0.9.3",
43
+ "@unocss/preset-uno": "0.9.3",
44
+ "@unocss/preset-attributify": "0.9.3",
45
+ "@unocss/preset-icons": "0.9.3",
45
46
  "@nuxt/kit": "npm:@nuxt/kit-edge@latest"
46
47
  },
47
48
  "scripts": {