You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
We use dotenv-webpack to have access to env variables from within React, not just on the server side.
Webpack cannot build on heroku because dotenv-webpack can't find a .env file. Reason being that you don't actually have a .env file on Heroku but all env vars are being managed in the Heroku interface.
But I don't understand how we managed to get the class-11 final project build?
Further, the configuration in the boilerplate and class-11 is a bit different. There is not "path" in the boilerplate, leading me to believe that parsing env vars from .env during webpack build does not work in the boilerplate. Please check this and verify that the project not only builds on heroku, but it also parses env-vars during webpack build.
We use
dotenv-webpack
to have access to env variables from within React, not just on the server side.Webpack cannot build on heroku because
dotenv-webpack
can't find a.env
file. Reason being that you don't actually have a.env
file on Heroku but all env vars are being managed in the Heroku interface.This seems to be the solution:
https://stackoverflow.com/questions/59759085/heroku-failed-to-load-env
But I don't understand how we managed to get the class-11 final project build?
Further, the configuration in the boilerplate and class-11 is a bit different. There is not "path" in the boilerplate, leading me to believe that parsing env vars from .env during webpack build does not work in the boilerplate. Please check this and verify that the project not only builds on heroku, but it also parses env-vars during webpack build.
boilerplate-for-fp/webpack.config.js
Lines 57 to 59 in 5afaf90
The text was updated successfully, but these errors were encountered: