Skip to content

Commit

Permalink
feat: add vite-plugin-inspect
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Oct 8, 2022
1 parent e0d1854 commit 3cb13d0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/histoire/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"shiki": "0.10.1",
"sirv": "^2.0.2",
"tinypool": "^0.1.2",
"vite-plugin-inspect": "^0.7.5",
"vite-node": "0.23.4"
},
"peerDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/histoire/src/node/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from 'vite'
import { lookup as lookupMime } from 'mrmime'
import fs from 'fs-extra'
import ViteInspect from 'vite-plugin-inspect'
import { APP_PATH, TEMP_PATH } from './alias.js'
import { Context } from './context.js'
import { notifyStoryChange } from './stories.js'
Expand Down Expand Up @@ -128,6 +129,8 @@ export async function getViteConfigWithPlugins (isServer: boolean, ctx: Context)
return result
}

plugins.push(ViteInspect())

plugins.push({
name: 'histoire-vite-plugin',

Expand Down
26 changes: 22 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3cb13d0

Please sign in to comment.