-
-
Notifications
You must be signed in to change notification settings - Fork 27k
%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
Changes from all commits
9b7d2a7
115135b
500eee7
19b4218
2dacd86
4091c07
66cb8b7
3a714cf
c189feb
File filter
Filter by extension
Conversations
Jump to
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.