0.0.2 • Published 1 year ago

vite-plugin-mpa-inspect v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vite-plugin-mpa-inspect

NPM version

Forked and inspired by vite-plugin-inspect

Inspect the intermediate state of Vite plugins. Useful for debugging and authoring plugins.

npm.io

Install

npm i -D vite-plugin-mpa-inspect

Add plugin to your vite.config.ts:

// vite.config.ts
import Inspect from 'vite-plugin-mpa-inspect'

export default {
  plugins: [
    Inspect()
  ],
}

Then run npm run dev and visit localhost:5173/__inspect_mpa/ to inspect the modules.

Build Mode

To inspect transformation in build mode, you can pass the build: true option:

// vite.config.ts
import Inspect from 'vite-plugin-mpa-inspect'

export default {
  plugins: [
    Inspect({
      build: true,
      outputDir: '.vite-inspect'
    })
  ],
}

After running vite build, the inspector client will be generated under .vite-inspect, where you can use npx serve .vite-inspect to check the result.

License

MIT License © 2021-PRESENT Gweesin