vite.config.ts 575 B

12345678910111213141516171819202122232425
  1. import { defineConfig } from 'vite';
  2. import reactRefresh from '@vitejs/plugin-react';
  3. const svgrPlugin = require('vite-plugin-svgr');
  4. // https://vitejs.dev/config/
  5. export default defineConfig({
  6. base: '',
  7. // This changes the out put dir from dist to build
  8. // comment this out if that isn't relevant for your project
  9. build: {
  10. outDir: 'build',
  11. },
  12. server: {
  13. port: 3001,
  14. },
  15. plugins: [
  16. reactRefresh(),
  17. svgrPlugin({
  18. svgrOptions: {
  19. icon: true,
  20. // ...svgr options (https://react-svgr.com/docs/options/)
  21. },
  22. }),
  23. ],
  24. });