1

I use CRA (react-scripts@2.1.3). If I serve my app locally, so using webpack devserver, I have the expected files deployed. (bundle, chunks, etc...)

However, if I serve my build folder, with a npm run build, followed by a serve -s build, I have the following files deployed :

static/
    css/
    js /
    media/
    node_modules/
path/to/my/local/source/code
    node_modules
    src

My build folder is at the root, and contains all the files and folders I am expecting to see.

BTW, I use firebase hosting to deploy my app. And I see the same file structure in my deployed app.

Any clue what I'm missing here ?

John Doe
  • 1,092
  • 3
  • 12
  • 25

1 Answers1

0

ok, I found the answer. It was answered in CRA's github :

https://github.com/facebook/create-react-app/issues/1341

It may have been fixed with later releases of CRA. I'll use the fix that has been suggested in the discussion for now.

John Doe
  • 1,092
  • 3
  • 12
  • 25