-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Add option historyApiFallback #922
Conversation
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.
Why?
I want use react router5 in my app. i want add option like as |
You can do it on own side, why we need add it here? |
Many people want to see compatibility with webpack-dev-server options (i think). No additional dependencies required. Small useful change. |
Please provide example of the problem, because you can use |
Can you create simple git repo? I think I understand the problem, but I would like to check this before merge? Thanks |
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.
ah, you want to read index.html
from memory fs
We should add docs and tests on this option, please fix it and I will merge
Readme at 59382db |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #922 +/- ##
==========================================
+ Coverage 97.34% 97.38% +0.03%
==========================================
Files 9 9
Lines 377 382 +5
Branches 112 116 +4
==========================================
+ Hits 367 372 +5
Misses 9 9
Partials 1 1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
How i can fix it? |
Please rebase, should work |
Workflow dislike me )) |
types/utils/setupWriteToDisk.d.ts
Outdated
type MultiCompiler = import('webpack').MultiCompiler; | ||
type Compilation = import('webpack').Compilation; | ||
type IncomingMessage = import('../index.js').IncomingMessage; | ||
type ServerResponse = import('../index.js').ServerResponse; |
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.
Looks like we need to run prettier on all types files, can you do it?
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.
Yes of course
@drudrum Friendly ping |
@alexander-akait Sorry. We should finish this old PR :-) |
@alexander-akait Can you find approvers for this PR? |
!context.outputFileSystem.existsSync(filename) && | ||
options.historyApiFallback | ||
) { | ||
filename = path.join(outputPath); |
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.
Why do we need path.join
here, it doesn't have sense
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 will check. Look like mistake. May be we need change it to path.resolve
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.
Now this code looks like this option is not necessarily at all.
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.
Everything should work without this option.
I am confused.
I feel that i need cancel this PR.
This is duplicated PR. We have the same #930 |
This PR contains a:
Motivation / Use-Case
Adds support of history api (Example: React Router5)
Like this https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback
Breaking Changes
Additional Info