As mentioned in #201 - My builds no longer work after moving functions with dynamic imports guarded by !ENV_BOOKSHOP_LIVE. This patch allows my site to build correctly, both locally and on Cloudcannon.
This is a much larger change than my last PR and has the possibility to cause side effects for other astro sites... and I haven't tested this beyond a site build on my local machine and on Cloudcannon.
It may be possible to get ENV_BOOKSHOP_LIVE to work in ts files with a smaller code change, just with the esbuild.transform. If that is preferable I can revise the PR with only that change.
As mentioned in #201 - My builds no longer work after moving functions with dynamic imports guarded by
!ENV_BOOKSHOP_LIVE
. This patch allows my site to build correctly, both locally and on Cloudcannon.This is a much larger change than my last PR and has the possibility to cause side effects for other astro sites... and I haven't tested this beyond a site build on my local machine and on Cloudcannon.
It may be possible to get ENV_BOOKSHOP_LIVE to work in ts files with a smaller code change, just with the esbuild.transform. If that is preferable I can revise the PR with only that change.