1
0

vite.config.mts 736 B

123456789101112131415161718192021222324
  1. import { vendureDashboardPlugin } from '@vendure/dashboard/vite';
  2. import { join, resolve } from 'path';
  3. import { pathToFileURL } from 'url';
  4. import { defineConfig } from 'vite';
  5. export default defineConfig({
  6. build: {
  7. outDir: join(__dirname, 'dist/dashboard'),
  8. },
  9. plugins: [
  10. vendureDashboardPlugin({
  11. vendureConfigPath: pathToFileURL('./src/vendure-config.ts'),
  12. api: { host: 'http://localhost', port: 3000 },
  13. gqlOutputPath: './src/gql',
  14. }),
  15. ],
  16. resolve: {
  17. alias: {
  18. // This allows all plugins to reference a shared set of
  19. // GraphQL types.
  20. '@/gql': resolve(__dirname, './src/gql/graphql.ts'),
  21. },
  22. },
  23. });