Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit be7a93b

Browse files
committed
chore(vite): build legacy
1 parent a02a388 commit be7a93b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

vite.config.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from 'vite'
22
import reactRefresh from '@vitejs/plugin-react-refresh'
33
import macrosPlugin from 'vite-plugin-babel-macros'
4+
import legacy from '@vitejs/plugin-legacy'
45
// @ts-ignore
56
import { resolve } from 'path'
67

@@ -10,11 +11,17 @@ export default defineConfig({
1011
jsxFactory: 'jsx',
1112
jsxInject: 'import { jsx } from "@emotion/react"',
1213
},
13-
plugins: [reactRefresh({ exclude: [/node_modules/] }), macrosPlugin()],
14+
plugins: [
15+
reactRefresh({ exclude: [/node_modules/] }),
16+
macrosPlugin(),
17+
legacy({
18+
targets: ['chrome >= 70', 'firefox >= 72', 'edge >= 79', 'safari >= 13'],
19+
}),
20+
],
1421
resolve: {
1522
alias: {
1623
// @ts-ignore
17-
'@': resolve(__dirname, './src')
18-
}
19-
}
24+
'@': resolve(__dirname, './src'),
25+
},
26+
},
2027
})

0 commit comments

Comments
 (0)