@unocss/inspector 0.45.22 → 0.45.24
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 +3 -3
- package/dist/index.mjs +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const path = require('path');
|
|
4
3
|
const url = require('url');
|
|
4
|
+
const pathe = require('pathe');
|
|
5
5
|
const sirv = require('sirv');
|
|
6
6
|
const gzipSize = require('gzip-size');
|
|
7
7
|
|
|
@@ -10,11 +10,11 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
const sirv__default = /*#__PURE__*/_interopDefaultLegacy(sirv);
|
|
11
11
|
const gzipSize__default = /*#__PURE__*/_interopDefaultLegacy(gzipSize);
|
|
12
12
|
|
|
13
|
-
const _dirname = typeof __dirname !== "undefined" ? __dirname :
|
|
13
|
+
const _dirname = typeof __dirname !== "undefined" ? __dirname : pathe.dirname(url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
14
14
|
function UnocssInspector(ctx) {
|
|
15
15
|
async function configureServer(server) {
|
|
16
16
|
await ctx.ready;
|
|
17
|
-
server.middlewares.use("/__unocss", sirv__default(
|
|
17
|
+
server.middlewares.use("/__unocss", sirv__default(pathe.resolve(_dirname, "../dist/client"), {
|
|
18
18
|
single: true,
|
|
19
19
|
dev: true
|
|
20
20
|
}));
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/inspector",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.24",
|
|
4
4
|
"description": "The inspector UI for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"gzip-size": "^6.0.0",
|
|
38
|
+
"pathe": "^0.3.7",
|
|
38
39
|
"sirv": "^2.0.2"
|
|
39
40
|
},
|
|
40
41
|
"scripts": {
|