forked from Kibo/AstrologyChart2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
37 lines (36 loc) · 1.18 KB
/
vite.config.js
File metadata and controls
37 lines (36 loc) · 1.18 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
import {defineConfig} from 'vite';
import path from 'path';
export default defineConfig({
mode: 'development', // Vite automatically uses 'development' mode for dev server
define: {
// You can define environment variables here if needed (e.g., using process.env.VARIABLE)
'process.env': {}
},
build: {
// Output settings
lib: {
entry: path.resolve(__dirname, 'src/index.js'),
name: 'astrology',
fileName: 'astrochart2', // This will output astrochart2.js
formats: ['umd'], // UMD format
},
sourcemap: true, // Enables source maps (like 'inline-source-map' in Webpack)
},
plugins: [],
css: {
// CSS handling is built-in in Vite, but we can configure here
preprocessorOptions: {
// If you need SCSS or other preprocessors
},
},
server: {
// Vite automatically starts in development mode with hot-reloading (HMR)
port: 3000, // Optional: specify a port for the dev server
},
resolve: {
alias: {
// Optional: define aliases for paths
'@': path.resolve(__dirname, 'src')
}
},
});