Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 26.9k
%PUBLIC_URL% in development#6280
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
9b7d2a7115135b500eee719b42182dacd864091c0766cb8b73a714cfc189febFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -68,7 +68,7 @@ module.exports = function(proxy, allowedHost) { | ||||||
| hot: true, | ||||||
| // It is important to tell WebpackDevServer to use the same "root" path | ||||||
| // as we specified in the config. In development, we always serve from /. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Last part of the comment here as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
| ||||||
| publicPath: '/', | ||||||
| publicPath: paths.servedPath.slice(0, -1), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have been messing around with this locally and I have found that historyApiFallback: {// Paths with dots should still use the history fallback.// See https://github.com/facebook/create-react-app/issues/387.disableDotRule: true,index: paths.servedPath,},otherwise when you go to pages other than the home page with react router setup and refresh it will fail to load files. | ||||||
| // WebpackDevServer is noisy by default so we emit custom message instead | ||||||
| // by listening to the compiler events with `compiler.hooks[...].tap` calls above. | ||||||
| quiet: true, | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose the last part of the comment isn't true after this PR? :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.