Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit bf11d13

Browse files
feat: devtools plugin
1 parent c0fd0c3 commit bf11d13

27 files changed

+1686
-178
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default defineNuxtConfig({
3333
})
3434
```
3535

36-
3. Go to the media viewer page and start previewing your assets at [http://localhost:3000/_media-viewer](http://localhost:3000/_media-viewer)
36+
3. Go to the media viewer page and start previewing your assets at [http://localhost:3000/__media_viewer__/client](http://localhost:3000/__media_viewer__/client)
3737

3838

3939
## Development

build.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineBuildConfig } from 'unbuild'
2+
3+
export default defineBuildConfig({
4+
rollup: {
5+
inlineDependencies: true
6+
}
7+
})

package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,19 @@
1515
"dist"
1616
],
1717
"scripts": {
18-
"prepack": "nuxt-module-build",
19-
"dev": "nuxi dev playground",
20-
"dev:build": "nuxi build playground",
21-
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
18+
"prepack": "pnpm build",
19+
"dev": "nuxi dev src/client",
20+
"dev:playground": "pnpm build && nuxi dev playground",
21+
"dev:prepare": "nuxi prepare src/runtime",
22+
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client",
23+
"build:client": "nuxi generate src/client",
24+
"build:module": "nuxt-module-build",
2225
"release": "run-s release:*",
2326
"release:standard-version": "standard-version",
2427
"release:publish": "git push --follow-tags origin main && npm publish"
2528
},
2629
"dependencies": {
30+
"@nuxt/devtools-ui-kit": "^0.2.3",
2731
"@vueuse/core": "^9.2.0",
2832
"@vueuse/nuxt": "^9.2.0",
2933
"chalk": "^5.0.1",
@@ -36,12 +40,14 @@
3640
"qs": "^6.11.0"
3741
},
3842
"devDependencies": {
43+
"@nuxt/devtools": "0.2.3",
3944
"@nuxt/module-builder": "latest",
4045
"@nuxtjs/eslint-config-typescript": "latest",
4146
"@types/node": "^18.14.0",
4247
"eslint": "latest",
4348
"npm-run-all": "^4.1.5",
4449
"nuxt": "^3.2.0",
50+
"sirv": "^2.0.2",
4551
"standard-version": "^9.5.0",
4652
"typescript": "^4.9.5"
4753
}

playground/nuxt.config.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import MyModule from '..'
1+
import MediaViewer from '..'
22

33
export default defineNuxtConfig({
44
modules: [
5-
MyModule
5+
'@nuxt/devtools',
6+
// @ts-ignore
7+
MediaViewer
68
],
7-
myModule: {
8-
addPlugin: true
9+
mediaViewer: {
10+
installIpxMiddleware: true
911
}
1012
})

0 commit comments

Comments
 (0)