vite.themes.config.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import { defineConfig } from 'vite';
  2. // https://vitejs.dev/config/
  3. export default defineConfig(({ mode }) => {
  4. const isProd = mode === 'production';
  5. return {
  6. build: {
  7. outDir: 'dist/themes',
  8. manifest: true,
  9. rollupOptions: {
  10. input: [
  11. '/src/styles/antarctic.scss',
  12. '/src/styles/blackboard.scss',
  13. '/src/styles/christmas.scss',
  14. '/src/styles/default.scss',
  15. '/src/styles/fire-red.scss',
  16. '/src/styles/future.scss',
  17. '/src/styles/halloween.scss',
  18. '/src/styles/hufflepuff.scss',
  19. '/src/styles/kibela.scss',
  20. '/src/styles/island.scss',
  21. '/src/styles/jade-green.scss',
  22. '/src/styles/mono-blue.scss',
  23. '/src/styles/nature.scss',
  24. '/src/styles/spring.scss',
  25. '/src/styles/wood.scss',
  26. '/src/styles/classic.scss',
  27. ],
  28. output: {
  29. assetFileNames: isProd ? undefined : 'assets/[name].[ext]', // not attach hash
  30. },
  31. },
  32. },
  33. };
  34. });