-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
51 lines (50 loc) · 1.07 KB
/
vite.config.js
File metadata and controls
51 lines (50 loc) · 1.07 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
43
44
45
46
47
48
49
50
51
import { defineConfig } from 'vite'
import { viteStaticCopy as copy } from 'vite-plugin-static-copy'
import react from '@vitejs/plugin-react'
import * as path from 'path'
export default defineConfig({
plugins: [
/* react({
babel: {
plugins: [
["@babel/plugin-proposal-decorators", {version: "2023-11"}],
],
},
}), */
copy({
targets: [
{
src: '../node_modules/@shoelace-style/shoelace/dist/assets',
dest: 'shoelace',
},
{
src: './assets',
dest: ''
}
],
}),
],
root: 'src',
resolve: {
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }],
},
build: {
outDir: '../dist',
target: "es2022",
emptyOutDir: true,
lib: {
// Could also be a dictionary or array of multiple entry points
entry: './app.ts',
name: 'App',
// the proper extensions will be added
fileName: 'app',
},
},
esbuild: {
target: "es2022",
exclude: [],
},
define: {
'process.env': {}
}
})