@unocss/inspector 66.1.0-beta.4 → 66.1.0-beta.6

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
@@ -823,11 +823,12 @@ function UnocssInspector(ctx) {
823
823
  async function configureServer(server) {
824
824
  await ctx.ready;
825
825
  const baseUrl = "__unocss";
826
- server.middlewares.use(`/${baseUrl}`, sirv(resolve(_dirname, "../dist/client"), {
826
+ const middlewareUrl = `${server.config.base || "/"}${baseUrl}`;
827
+ server.middlewares.use(`${middlewareUrl}`, sirv(resolve(_dirname, "../dist/client"), {
827
828
  single: true,
828
829
  dev: true
829
830
  }));
830
- server.middlewares.use(`/${baseUrl}_api`, async (req, res, next) => {
831
+ server.middlewares.use(`${middlewareUrl}_api`, async (req, res, next) => {
831
832
  if (!req.url)
832
833
  return next();
833
834
  if (req.url === "/") {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/inspector",
3
3
  "type": "module",
4
- "version": "66.1.0-beta.4",
4
+ "version": "66.1.0-beta.6",
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/rule-utils": "66.1.0-beta.4",
42
- "@unocss/core": "66.1.0-beta.4"
41
+ "@unocss/core": "66.1.0-beta.6",
42
+ "@unocss/rule-utils": "66.1.0-beta.6"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "unbuild",