Skip to content

Commit c6cd086

Browse files
committed
refactor: inspector
1 parent bd3908f commit c6cd086

File tree

15 files changed

+426
-583
lines changed

15 files changed

+426
-583
lines changed

example/nuxt/App.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,13 @@
1010
<a href="https://github.com/webfansplz/vite-plugin-vue-inspector">Give me a star if it helps you 💗 .</a>
1111
</div>
1212
</div>
13-
<inspector-overlay v-if="isDev" />
1413
</template>
1514
<script lang="ts">
1615
import Hi from "./Hi.vue"
17-
import InspectorOverlay from "vite-plugin-vue-inspector/overlay.vue"
1816
export default {
1917
name: "App",
2018
components: {
2119
Hi,
22-
InspectorOverlay,
23-
},
24-
setup() {
25-
return {
26-
isDev: process.dev,
27-
}
2820
},
2921
}
3022
</script>

example/nuxt/main.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/nuxt/nuxt.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import Inspector from "vite-plugin-vue-inspector"
44
export default defineNuxtConfig({
55
vite: {
66
plugins: [
7-
Inspector(),
7+
Inspector({
8+
appendTo: "entry.mjs",
9+
}),
810
],
911
},
1012
})

package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
},
1818
"author": "webfansplz",
1919
"files": [
20-
"dist"
20+
"dist",
21+
"src/load.js",
22+
"src/Overlay.vue"
2123
],
2224
"exports": {
2325
".": {
@@ -31,16 +33,16 @@
3133
"./overlay.vue": {
3234
"import": "./dist/InspectorOverlay.vue",
3335
"require": "./dist/InspectorOverlay.vue"
34-
}
36+
},
37+
"./src/*": "./src/*"
3538
},
3639
"main": "./dist/index.js",
3740
"module": "./dist/index.mjs",
3841
"scripts": {
3942
"lint": "eslint --fix --ext .js,.ts,.vue .",
4043
"update-version": "esmo scripts/update-version.ts",
41-
"build-overlay": "esmo scripts/build-overlay.ts",
4244
"copy-overlay": "esno scripts/copy-overlay.ts",
43-
"build": "pnpm run build-overlay && tsup src/index.ts --format cjs,esm --dts && pnpm run copy-overlay"
45+
"build": "tsup src/index.ts --format cjs,esm --dts && pnpm run copy-overlay"
4446
},
4547
"bugs": {
4648
"url": "https://github.com/webfansplz/vite-plugin-vue-inspector/issues"
@@ -57,12 +59,12 @@
5759
"@vue/compiler-dom": "^3.2.31",
5860
"chalk": "4.1.2",
5961
"esno": "^0.14.1",
62+
"kolorist": "^1.5.1",
6063
"magic-string": "^0.26.1",
6164
"shell-quote": "^1.7.3"
6265
},
6366
"devDependencies": {
6467
"@types/babel__core": "^7.1.19",
65-
"@vue/compiler-sfc": "^3.2.31",
6668
"@webfansplz/eslint-config": "^0.1.0",
6769
"eslint": "^8.11.0",
6870
"esmo": "^0.14.1",
@@ -71,9 +73,6 @@
7173
"tsup": "^5.12.1",
7274
"typescript": "^4.6.2",
7375
"vite": "^2.9.1",
74-
"vue": "^3.2.31",
75-
"vue-template-compiler": "^2.6.14",
76-
"vue-template-es2015-compiler": "^1.9.1",
77-
"zx": "^6.0.6"
76+
"vue": "^3.2.31"
7877
}
7978
}

0 commit comments

Comments
 (0)