Skip to content

Commit

Permalink
perf(build): use esnext as build target
Browse files Browse the repository at this point in the history
prevent performance lose in old js target
  • Loading branch information
lslzl3000 committed Nov 18, 2023
1 parent 3a0293a commit 2fc6f27
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,17 @@ export default defineConfig(option => ({
server.watcher.on('unlink', autoIndex)
}
}, {
name: 'cors',
configureServer: server => {
// server.middlewares.use((_req, res, next) => {
// res.setHeader("Cross-Origin-Resource-Policy", "cross-origin")
// res.setHeader("Cross-Origin-Opener-Policy", "same-origin")
// res.setHeader("Cross-Origin-Embedder-Policy", "require-corp")
// })
}
// name: 'cors',
// configureServer: server => {
// server.middlewares.use((_req, res, next) => {
// res.setHeader("Cross-Origin-Resource-Policy", "cross-origin")
// res.setHeader("Cross-Origin-Opener-Policy", "same-origin")
// res.setHeader("Cross-Origin-Embedder-Policy", "require-corp")
// })
// }
}],
build: {
target: 'esnext',
lib: {
entry: resolve(__dirname, './src/index.ts'),
name: 'Orillusion',
Expand Down

0 comments on commit 2fc6f27

Please sign in to comment.