Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Migrating from Parcel Implicit ~ Alias Resolution to Vite Explicit ~ Resolution
import { defineConfig } from 'vite'
import path from 'path'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'~': path.resolve(__dirname, './src')
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment