Other question… I’m using StaticSite to build a Re...
# sst
a
Other question… I’m using StaticSite to build a ReactJS app with Webpack (no CRA used). But I can’t get it to receive my environment variables. I ended up doing this:
Copy code
plugins: [
    new Dotenv({
      path: path.join(process.cwd(), `/sst/.env.${process.env.SST_STAGE}`),
    }),
  ],
But this creates other problems…
t
how did you try to pass in the environment variables?
a
Yeah figured out.
Used another plugin.
t
got it
fyi checkout vite if you haven't, it's much better than webpack
a
Yeah well, we want to use CRA.
But we needed updated webpack to do micro-frontend.
So we had to skip CRA… and now CRA has been updated with latest webpack.
So we might switch to CRA.
🙂
I hate webpack.
t
I may be running into this issue with a last minute change from ParcelJS to use Webpack. Would you be willing to tell me how you managed to get Webpack to see the environment variables? @Adrián Mouly