3

I am currently using Neutrinojs and have gotten burned by the compatiblity issues arising with v8. the solution seems to be "Use Neutrino v.9 beta" but in that scenario many features I've come to depend on in v.8 have gotten screwy.

Specifically recent changes to WebPack has made Neutrino 8 flaky, and I've had to monkey patch

Here are the kind of tasks I do:

  • Import env variables into React for values such as Auth0 client ID
  • Customize the html/links to pull in css, fonts, etc
  • eslint validate the code
  • write Jasmine tests
  • Include static files/folders in the build
  • Have a developer server that responds to react router urls: i.e., localhost:5000/users/bob doesn't load in Neutrino without hacking the dev server.

Given my desire to "Not Neutrino" what react build system works and how does it allow you to handle/customize these features?

Thanks in advance David Edelhart

I have been using Neutrino v.8 but many of these tasks require significant customization and it has memory issues that are intermittent, despite the fact that the site is actually pretty small.

Dave Edelhart
  • 31
  • 1
  • 2

1 Answers1

2

If you're using CRA (create-react-app), any environment variable that doesn't start with REACT_APP_ will get dropped. So you need to name your environment variables like REACT_APP_AUTH0_CLIENT_ID. To inject custom environment variables, you can use something like cross-env or a .env file.

For more: https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables

smddzcy
  • 443
  • 4
  • 19