28 lines
680 B
TypeScript
Executable File
28 lines
680 B
TypeScript
Executable File
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import svgrPlugin from 'vite-plugin-svgr'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
import path from 'path'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
// This changes the out put dir from dist to build
|
|
// comment this out if that isn't relevant for your project
|
|
build: {
|
|
outDir: 'build',
|
|
},
|
|
plugins: [
|
|
react(),
|
|
VitePWA({}),
|
|
svgrPlugin({
|
|
svgrOptions: {
|
|
icon: true,
|
|
// ...svgr options (https://react-svgr.com/docs/options/)
|
|
},
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }],
|
|
}
|
|
})
|