@unocss/astro 0.55.7 → 0.56.1

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/index.cjs CHANGED
@@ -3,6 +3,7 @@
3
3
  const node_path = require('node:path');
4
4
  const node_url = require('node:url');
5
5
  const VitePlugin = require('@unocss/vite');
6
+ const vite = require('vite');
6
7
 
7
8
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
8
9
 
@@ -28,7 +29,7 @@ function AstroVitePlugin(options) {
28
29
  },
29
30
  async resolveId(id, importer) {
30
31
  if (RESOLVED_ID_RE.test(id)) {
31
- return this.resolve(node_path.join(root, id), importer, { skipSelf: true });
32
+ return this.resolve(vite.normalizePath(node_path.join(root, id)), importer, { skipSelf: true });
32
33
  }
33
34
  if (id === UNO_INJECT_ID) {
34
35
  if (injectReset) {
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { resolve, join } from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
3
  import VitePlugin from '@unocss/vite';
4
+ import { normalizePath } from 'vite';
4
5
 
5
6
  const RESOLVED_ID_RE = /[\/\\]__uno(?:(_.*?))?\.css$/;
6
7
 
@@ -22,7 +23,7 @@ function AstroVitePlugin(options) {
22
23
  },
23
24
  async resolveId(id, importer) {
24
25
  if (RESOLVED_ID_RE.test(id)) {
25
- return this.resolve(join(root, id), importer, { skipSelf: true });
26
+ return this.resolve(normalizePath(join(root, id)), importer, { skipSelf: true });
26
27
  }
27
28
  if (id === UNO_INJECT_ID) {
28
29
  if (injectReset) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/astro",
3
- "version": "0.55.7",
3
+ "version": "0.56.1",
4
4
  "description": "UnoCSS integration for Astro",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -45,12 +45,12 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@unocss/core": "0.55.7",
49
- "@unocss/reset": "0.55.7",
50
- "@unocss/vite": "0.55.7"
48
+ "@unocss/core": "0.56.1",
49
+ "@unocss/reset": "0.56.1",
50
+ "@unocss/vite": "0.56.1"
51
51
  },
52
52
  "devDependencies": {
53
- "astro": "^2.10.14"
53
+ "astro": "^3.1.0"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "unbuild",