-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
50 lines (49 loc) · 1.15 KB
/
vite.config.js
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
import postcss from "postcss";
import devtools from "solid-devtools/vite";
import tailwindcss from "tailwindcss";
import { defineConfig } from "vite";
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
import solidPlugin from "vite-plugin-solid";
import solidSvg from "vite-plugin-solid-svg";
export default defineConfig({
plugins: [
solidPlugin(),
solidSvg(),
devtools({
autoname: true,
locator: true,
}),
cssInjectedByJsPlugin(),
],
server: {
port: 3000,
},
build: {
target: "esnext",
rollupOptions: {
input: "./src/index.jsx",
output: {
inlineDynamicImports: true,
format: "iife",
entryFileNames: "bundle.js",
chunkFileNames: "[name].js",
assetFileNames: "[name][extname]",
},
plugins: [
postcss({
plugins: [
tailwindcss({
content: ["./src/**/*.tsx", "./src/**/*.jsx"],
}),
],
extract: false,
modules: false,
autoModules: false,
minimize: true,
inject: false,
sourceMap: true,
}),
],
},
},
});