If you are using
vite-plugin-svelte
, use theinspector
options instead: https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#inspector
Play with the LIVE DEMO.
# pnpm
pnpm install vite-plugin-svelte-inspector -D
# yarn
yarn add vite-plugin-svelte-inspector -D
# npm
npm install vite-plugin-svelte-inspector -D
// filename: svelte.config.js
// for vue2
import Inspector from 'vite-plugin-svelte-inspector';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// ...
vite: {
plugins: [Inspector()],
},
},
};
export default config;