@unocss/vite 0.45.9 → 0.45.14

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
@@ -2,8 +2,6 @@
2
2
 
3
3
  The Vite plugin for UnoCSS. Ships with the `unocss` package.
4
4
 
5
- > This plugin does not come with any default presets. You are building a meta framework on top of UnoCSS, see [this file](https://github.com/unocss/unocss/blob/main/packages/unocss/src/vite.ts) for an example to bind the default presets.
6
-
7
5
  ## Installation
8
6
 
9
7
  ```bash
@@ -30,6 +28,9 @@ import 'uno.css'
30
28
 
31
29
  ### Presetless usage
32
30
 
31
+ > This plugin does not come with any default presets.
32
+ > If you are building a meta framework on top of UnoCSS, see [this file](https://github.com/unocss/unocss/blob/main/packages/unocss/src/vite.ts) for an example to bind the default presets.
33
+
33
34
  ```bash
34
35
  npm i -D @unocss/vite
35
36
  ```
package/dist/index.cjs CHANGED
@@ -7,8 +7,8 @@ const core = require('@unocss/core');
7
7
  const pluginutils = require('@rollup/pluginutils');
8
8
  const config = require('@unocss/config');
9
9
  const crypto = require('crypto');
10
- const path = require('path');
11
10
  const MagicString = require('magic-string');
11
+ const path = require('path');
12
12
  const remapping = require('@ampproject/remapping');
13
13
  const fs = require('fs');
14
14
  const url = require('url');
@@ -329,9 +329,7 @@ function GlobalModeBuildPlugin({ uno, ready, extract, tokens, filter, getConfig
329
329
  },
330
330
  {
331
331
  name: "unocss:global:build:generate",
332
- apply(options, { command }) {
333
- return command === "build" && !options.build?.ssr;
334
- },
332
+ apply: "build",
335
333
  configResolved(config) {
336
334
  viteConfig = config;
337
335
  },
package/dist/index.mjs CHANGED
@@ -3,8 +3,8 @@ import { cssIdRE, createGenerator, BetterMap, notNull, toEscapedSelector } from
3
3
  import { createFilter } from '@rollup/pluginutils';
4
4
  import { loadConfig } from '@unocss/config';
5
5
  import { createHash } from 'crypto';
6
- import { resolve, dirname } from 'path';
7
6
  import MagicString from 'magic-string';
7
+ import { resolve, dirname } from 'path';
8
8
  import remapping from '@ampproject/remapping';
9
9
  import fs from 'fs';
10
10
  import { fileURLToPath } from 'url';
@@ -318,9 +318,7 @@ function GlobalModeBuildPlugin({ uno, ready, extract, tokens, filter, getConfig
318
318
  },
319
319
  {
320
320
  name: "unocss:global:build:generate",
321
- apply(options, { command }) {
322
- return command === "build" && !options.build?.ssr;
323
- },
321
+ apply: "build",
324
322
  configResolved(config) {
325
323
  viteConfig = config;
326
324
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/vite",
3
- "version": "0.45.9",
3
+ "version": "0.45.14",
4
4
  "description": "The Vite plugin for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -44,15 +44,15 @@
44
44
  "dependencies": {
45
45
  "@ampproject/remapping": "^2.2.0",
46
46
  "@rollup/pluginutils": "^4.2.1",
47
- "@unocss/config": "0.45.9",
48
- "@unocss/core": "0.45.9",
49
- "@unocss/inspector": "0.45.9",
50
- "@unocss/scope": "0.45.9",
51
- "@unocss/transformer-directives": "0.45.9",
47
+ "@unocss/config": "0.45.14",
48
+ "@unocss/core": "0.45.14",
49
+ "@unocss/inspector": "0.45.14",
50
+ "@unocss/scope": "0.45.14",
51
+ "@unocss/transformer-directives": "0.45.14",
52
52
  "magic-string": "^0.26.2"
53
53
  },
54
54
  "devDependencies": {
55
- "@unocss/shared-integration": "0.45.9",
55
+ "@unocss/shared-integration": "0.45.14",
56
56
  "vite": "^3.0.8"
57
57
  },
58
58
  "scripts": {