codegouvfr / sill

The code of : https://code.gouv.fr/sill
https://code.gouv.fr/sill
11 stars 7 forks source link

setup CRA env to adapt to relative URL depending on environements #117

Closed JeromeBu closed 5 months ago

garronej commented 5 months ago

You need to replace every occurence of %PUBLIC_URL% in public/index.html by %REACT_APP_PUBLIC_URL%. Other than that, LGTM.

Again cra-env is not as developed ad vite-envs.
In cra-envs there's a lot of hoops you need to jump into to make it work. With vite-envs it's seeamless since it's a legit plugin for the bundler as opposed to cra-envs that monkey patches.

JeromeBu commented 5 months ago

I ended up working things out differently. I am closing the PR as it is not needed any more.