Skip to content

Commit

Permalink
Merge pull request #368 from USEPA/feature/further-adjust-vite-config
Browse files Browse the repository at this point in the history
Feature/further adjust vite config
  • Loading branch information
courtneymyers authored Oct 5, 2023
2 parents 50274b8 + c48ec32 commit c22a989
Showing 1 changed file with 10 additions and 12 deletions.
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

0 comments on commit c22a989

Please sign in to comment.