Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

[BUG] Output file structure looks different than "npm run build" #283

Closed
Samathingamajig opened this issue Dec 10, 2020 · 2 comments
Closed

Comments

@Samathingamajig
Copy link

Support plan

  • is this issue currently blocking your project? (yes/no): yes
  • is this issue affecting a production system? (yes/no): yes/no, I don't know what you mean by "affecting a production system"

Context

  • node version: v10.22.0
  • module version with issue: 3.4.0
  • last module version without issue: ?
  • environment (e.g. node, browser, native): node/browser
  • used with (e.g. hapi application, another framework, standalone, ...): Flask backend, Create-React-App
  • any other relevant information: This is on https://repl.it, but that shouldn't be affecting this

What are you trying to achieve or the steps to reproduce?

I'm trying to use cra-build-watch to auto build my create-react-app, but the file structure of the build-watch is different than the file structure, which doesn't work for development since the Flask backend requires ./client/build/static/ to be the static files folder (client is the folder with the React app).

What was the result you got?

./build
-- /js
---- 0.chunk.js
---- 0.chunk.js.map
---- 1.chunk.js
---- 1.chunk.js.map
---- bundle.chunk.js
---- bundle.chunk.js.map
---- main.chunk.js
---- main.chunk.js.map
-- asset-manifest.json
-- favicon.ico
-- index.html
-- logo192.png
-- logo512.png
-- manifest.json
-- robots.txt

What result did you expect?

I expected there to be a ./static/ folder with ./js inside of it.

./build
-- /static
---- /css
------ main.a_hash.chunk.css
------ main.a_hash.chunk.css.map
---- /js
------ 2.a_hash.chunk.js
------ 2.a_hash.chunk.js.LICENSE.txt
------ 2.a_hash.chunk.js.map
------ main.a_hash.chunk.js
------ main.a_hash.chunk.js.map
------ runtime-main.a_hash.chunk.js
------ runtime-main.a_hash.chunk.js.map
-- asset-manifest.json
-- favicon.ico
-- index.html
-- logo192.png
-- logo512.png
-- manifest.json
-- robots.txt

Note:

Even when I change my script to:

{
  "scripts": {
    "watch": "cra-build-watch -b ./build/static"
  }
}

it just makes the same directory structure as the first tree, except everything is in the ./build/static/ folder, not just the JavaScript and CSS (the CSS also never seems to appear?)

@Samathingamajig Samathingamajig changed the title Output file structure looks different than "npm run build" [BUG] Output file structure looks different than "npm run build" Dec 10, 2020
@rykener
Copy link

rykener commented Dec 31, 2020

This is blocking me from releasing a feature to my django-manifest-loader package which will use cra-build-watch to help connect create-react-app to django. Would love to see a fix asap.

@Nargonath
Copy link
Owner

Sorry I don't have time to maintain this project anymore so I'll archive it and add a note in the README. Feel free to fork it as you see fit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants