Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/further adjust vite config #368

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions app/client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ export default ({ mode }) => {
outDir: "build",
sourcemap: true,
rollupOptions: {
/*
NOTE: The following is required to avoid a bug with a GitHub Action
workflow including `regenerator-runtime` in the build as an external
dependency.

For reference, the GitHub Action workflow's log message stated:
"regenerator-runtime/runtime.js" is imported by "regenerator-runtime/runtime.js?commonjs-external",
but could not be resolved – treating it as an external dependency.
*/
external: ["regenerator-runtime"],
output: {
entryFileNames: "static/js/[name]-[hash].js",
chunkFileNames: "static/js/[name]-[hash].js",
Expand All @@ -35,18 +45,6 @@ export default ({ mode }) => {
},
},
},
/*
NOTE:
The following is required to avoid a bug with a GitHub Action workflow
including `regenerator-runtime` in the build as an external dependency.

For reference, the GitHub Action workflow's log message stated:
"regenerator-runtime/runtime.js" is imported by "regenerator-runtime/runtime.js?commonjs-external",
but could not be resolved – treating it as an external dependency.
*/
optimizeDeps: {
exclude: ["regenerator-runtime"],
},
define: {
"process.env": {},
},
Expand Down
Loading