This creates jsconfig.json tsconfig.json vscode/settings.json from viteConfig/resolve/alias.
- No configuration
- Lightweight
- with npm
npm i vite-vscode
- with yarn
yarn add vite-vscode
- with pnpm
pnpm add vite-vscode
/* vite.config.js */
Configure your application with whatever configuration you want.
import viteVSCode from 'vite-vscode'
const plugins = [/* Other plugins... */ viteVSCode()]
export default defineConfig({ plugins /* Whatever.... */ })
import viteVSCode, { config } from 'vite-vscode'
const resolve = { alias: config.aliases('$', './src') }
const plugins = [/* Other plugins... */ viteVSCode()]
// createAlias takes a prefix and target dir
// Returns child dirs with the prefix
// ./src/components --- $components
// ./src/layouts --- $layouts
// ./src/store --- $store
export default defineConfig({ plugins /* Whatever.... */ })
Made by Nazmus Sayad with ❤️.