@unocss/inspector 66.1.2 → 66.1.4

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.
Files changed (2) hide show
  1. package/dist/index.mjs +3 -2
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -905,8 +905,9 @@ function UnocssInspector(ctx) {
905
905
  server.printUrls = () => {
906
906
  _printUrls();
907
907
  for (const localUrl of server.resolvedUrls?.local ?? []) {
908
- const url = server.config.base ? localUrl.replace(server.config.base, "") : localUrl;
909
- const inspectorUrl = url.endsWith("/") ? `${url}${baseUrl}/` : `${url}/${baseUrl}/`;
908
+ const appUrl = localUrl.endsWith("/") ? localUrl : `${localUrl}/`;
909
+ const serverUrl = server.config.base && appUrl.endsWith(server.config.base) ? appUrl.slice(0, -server.config.base.length) : appUrl.slice(0, -1);
910
+ const inspectorUrl = `${serverUrl}/${baseUrl}/`;
910
911
  console.log(` ${green("\u279C")} ${bold("UnoCSS Inspector")}: ${colorUrl(`${inspectorUrl}`)}`);
911
912
  }
912
913
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/inspector",
3
3
  "type": "module",
4
- "version": "66.1.2",
4
+ "version": "66.1.4",
5
5
  "description": "The inspector UI for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -38,8 +38,8 @@
38
38
  "gzip-size": "^6.0.0",
39
39
  "sirv": "^3.0.1",
40
40
  "vue-flow-layout": "^0.1.1",
41
- "@unocss/core": "66.1.2",
42
- "@unocss/rule-utils": "66.1.2"
41
+ "@unocss/core": "66.1.4",
42
+ "@unocss/rule-utils": "66.1.4"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "unbuild",