You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that you're handling production in a pretty complicated way. You're basically telling people to either use Python on the prod platform or set up a programmatic server using express (here).
Why? All of this could be solved easier:
npminstall--saveserve
And then this command would sit in a script property of your choice inside package.json:
serve-s./build
By default, serve is just a beautiful, tiny (and fast as hell) webserver for static files and sites. But in combination with the -s or --single flag, it will handle all of the logic required for making single page applications work (in terms of routing).
I would even suggest shipping serve by default as a dependency (like you're doing it with react-scripts and react).
Let me know what you think! 😊
The text was updated successfully, but these errors were encountered:
One of the reasons is I want to show that this is Node-agnostic, and that they can integrate it into existing apps (which likely aren’t static). We also have a build message that suggest using pushstate-server to test their changes.
I wouldn’t mind switching recommendation to serve if it satisfies our use cases better. For the docs, I’m open to adding it as another (simpler) option, and rephrasing others as explanation that you don’t have to use Node, and you don’t have to use a static-only server either.
I noticed that you're handling production in a pretty complicated way. You're basically telling people to either use Python on the prod platform or set up a programmatic server using express (here).
Why? All of this could be solved easier:
And then this command would sit in a
script
property of your choice insidepackage.json
:By default, serve is just a beautiful, tiny (and fast as hell) webserver for static files and sites. But in combination with the
-s
or--single
flag, it will handle all of the logic required for making single page applications work (in terms of routing).I would even suggest shipping serve by default as a dependency (like you're doing it with
react-scripts
andreact
).Let me know what you think! 😊
The text was updated successfully, but these errors were encountered: