-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.showcase.ts
57 lines (55 loc) · 1.49 KB
/
vite.config.showcase.ts
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
52
53
54
55
56
57
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react-swc"
import { resolve } from "node:path"
//import checker from "vite-plugin-checker"
// postcss:
import tailwindcss from "tailwindcss"
import autoprefixer from "autoprefixer"
//
export default defineConfig({
css: {
postcss: {
plugins: [tailwindcss("./tailwind.config.sc.js"), autoprefixer],
},
},
build: {
outDir: resolve(__dirname, "./dist-showcase"),
target: "es2022",
emptyOutDir: true,
rollupOptions: {
input: {
main: resolve(__dirname, "./showcase/index.html"),
applayoutexample: resolve(
__dirname,
"./showcase/applayoutexample/index.html",
),
},
},
},
resolve: {
alias: {
"@linked-planet/ui-kit-ts": resolve(__dirname, "./library/src"),
},
},
define: {
"process.env": {}, // this is necessary because form.js in @atlaskit uses process.env.NODE_ENV
//"process.env.NODE_ENV": {}, // this is necessary because form.js in @atlaskit uses process.env.NODE_ENV
// Some libraries use the global object, even though it doesn't exist in the browser.
// Alternatively, we could add `<script>window.global = window;</script>` to index.html.
// https://github.com/vitejs/vite/discussions/5912
//global: {}, //-> this breaks @atlaskit/tokens build
},
base: "/ui-kit-ts",
root: "./showcase",
publicDir: "public",
plugins: [
react(),
/*tsconfigPaths({
configNames: ["./tsconfig.showcase.json"],
}),*/
//checker({ typescript: true }),
],
server: {
port: 3000,
},
})