Abdul Taleb
09/09/2021, 3:22 AMStaticSite
construct and environment variables and it seems that it sets the variables with {{ VARIABLE }}
rather than actually setting the variable, and after build it will inject the variable using some type of text match/find-replace. The problem is that in some static sites, the build happens via webpack and process.env.VARIABLE is handled via webpack's definePlugin
module, which expects the actual value to be set before the build process. Has anyone faced this issue? If yes, how have you solved it? Any help would be appreciated.thdxr
09/09/2021, 3:23 AMthdxr
09/09/2021, 3:24 AMthdxr
09/09/2021, 3:25 AMAbdul Taleb
09/09/2021, 3:26 AMAbdul Taleb
09/09/2021, 3:26 AMAbdul Taleb
09/09/2021, 3:26 AMAbdul Taleb
09/09/2021, 3:27 AMThe DefinePlugin replaces variables in your code with other values or expressions at compile time.
Abdul Taleb
09/09/2021, 3:27 AMthdxr
09/09/2021, 3:27 AMsst-env
you don't need the definePluginAbdul Taleb
09/09/2021, 3:28 AM