vite.config.mts 505 B

123456789101112
  1. import { vendureDashboardPlugin } from '@vendure/dashboard/plugin';
  2. import { pathToFileURL } from 'url';
  3. import { defineConfig, UserConfig } from 'vite';
  4. export default defineConfig(async () => {
  5. // TODO: hide this ugly stuff internally so we just need to pass a relative path to the plugin
  6. const vendureConfigPath = pathToFileURL('./dev-config.ts').href.replace(/^file:[\//]+/, '');
  7. return {
  8. plugins: [vendureDashboardPlugin({ vendureConfigPath })],
  9. } satisfies UserConfig;
  10. });