-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create dev/index.html during development (using npm start -s
)
#588
Comments
If you need physical files, then why not just run the prod build: |
This would not work with hot reloading during development, right? I seem to remember it being possible to host the files through something like django/flask while still running the webpack solution through npm. |
Correct. No hot reloading on prod build. I'd recommend finding a way to run your React app all by itself so you can use |
If you really wanted to persist files and have hot reloading in dev mode, you could use a webpack plugin like write-file-webpack-plugin. Obviously out of the scope of react-slingshot, but leaving it here for you if you want to try it out. I've used it in the past while building a Chrome extension in React. Found it super handy. |
Thank you @nickytonline I'll give that a try, it looks like what i need :) @coryhouse the problem is that i want to test out an authentication logic that uses cookies created by flask-dance for google auth. This cookie is created automatically on the domain of the flask app, so i need to serve the react app from the same domain to be able to access the cookie (i think). However I'm searching for other ways to do the login process, if you have any tips on this related to flask and/or React using Google login, let me know :)) |
I'm about to go crazy due to this magic:
More specifically this:
// Note: Physical files are only output by the production build task npm run build
So the question is, how do I make webpack create physical files in
dev/
? I need this to be able to serve my application through Flask (python) during development as well as production.The text was updated successfully, but these errors were encountered: