Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
charlieforward9 committed Jul 4, 2024
1 parent 44f71cd commit 219cf0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<body>
<div id="app"></div>
<script type="module">
window.global = window;
import { renderToDom } from "./src/App";

renderToDom(document.querySelector("#app"));
Expand Down
9 changes: 9 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ export default defineConfig(({ mode }) => {
return {
plugins: [MillionLint.vite(), react()],
define: {
"process.env": process.env ?? {},
"process.env.GOOGLE_MAPS_API_KEY": JSON.stringify(VITE_MAP_KEY),
},
build: {
target: "es2020",
},
optimizeDeps: {
esbuildOptions: {
target: "es2020",
},
},
};
});

0 comments on commit 219cf0f

Please sign in to comment.