diff --git a/app/client/vite.config.ts b/app/client/vite.config.ts index 4b81a02b..7079896e 100644 --- a/app/client/vite.config.ts +++ b/app/client/vite.config.ts @@ -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", @@ -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": {}, },