forked from EmmanuelDevs-Software/Basic-React-Crypto-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
44 lines (43 loc) · 1.14 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
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import nodePolyfills from 'rollup-plugin-node-polyfills'
// https://vitejs.dev/config/
export default defineConfig({
presets: [
"@emotion/babel-preset-css-prop",
],
build: {
polyfillModulePreload: true,
target: 'es2022',
//lib: false,
//rollupOptions: {
//plugins: [
//nodePolyfills(),
//],
//},
},
plugins: [
react({
babel: {
plugins: [
"babel-plugin-macros",
//["babel-plugin-twin", { debug: true }, "twinning"],
"@emotion",
"babel-plugin-transform-inline-environment-variables",
["@emotion/babel-plugin-jsx-pragmatic", {
export: "jsx",
import: "__cssprop",
module: "@emotion/react",
}, "emotion-jsx"],
["@babel/plugin-transform-react-jsx", {
pragma: "__cssprop",
pragmaFrag: "React.Fragment"
}, "fragment-jsx"],
["@babel/plugin-transform-react-jsx", {
pragma: "__cssprop"
}, "twin.macro", ],
],
},
}), // plugin.react
]
})