-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.dome.ts
More file actions
42 lines (41 loc) · 1 KB
/
Copy pathvite.config.dome.ts
File metadata and controls
42 lines (41 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';
import { fileURLToPath } from 'node:url';
export default defineConfig({
publicDir: false,
define: {
'process.env.NODE_ENV': JSON.stringify('production'),
},
plugins: [react()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
css: {
postcss: {
plugins: [
tailwindcss({ config: fileURLToPath(new URL('./tailwind.dome.config.js', import.meta.url)) }),
autoprefixer(),
],
},
},
build: {
outDir: 'dome',
emptyOutDir: true,
lib: {
entry: fileURLToPath(new URL('./src/dome-embed.tsx', import.meta.url)),
name: 'DomeSkillsEmbed',
formats: ['iife'],
fileName: () => 'dome-skills.js',
},
rollupOptions: {
output: {
inlineDynamicImports: true,
assetFileNames: 'dome-skills.css',
},
},
},
});