aleclarson / vite-tsconfig-paths

Support for TypeScript's path mapping in Vite
MIT License
1.35k stars 50 forks source link

Why not simply import tsconfig.json in vite.config.js? #124

Closed jaymakes11 closed 1 year ago

jaymakes11 commented 1 year ago

e.g.


// vite.config.js

import { defineConfig } from 'vite'
import tsconfig from './tsconfig.json'

export default defineConfig({
  resolve: {
    alias: tsconfig.compilerOptions.paths
  }
})
aleclarson commented 1 year ago

https://github.com/aleclarson/vite-tsconfig-paths/issues/116#issuecomment-1571068640