Skip to content

Instantly share code, notes, and snippets.

@davemo
Created November 26, 2021 21:51
Show Gist options
  • Save davemo/76a46d9ba37261d9240ddd1d17a5ac89 to your computer and use it in GitHub Desktop.
Save davemo/76a46d9ba37261d9240ddd1d17a5ac89 to your computer and use it in GitHub Desktop.
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