-
-
Notifications
You must be signed in to change notification settings - Fork 7k
fix: inline proxies for virtual html in transformIndexHtml #7993
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
Merged
patak-dev
merged 10 commits into
vitejs:main
from
saurabhdaware:fix/undefined-importermodule
May 4, 2022
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1d34d51
fix(importAnalysis): early null return on undefined
saurabhdaware ac05f25
chore: revert isDebug change
saurabhdaware 2a764af
fix: url may be '/' run resolveId get real path
poyoho ccda81b
feat: add try catch to resolveId
saurabhdaware a2a0d4f
feat: handle html name in getHtmlFilename
saurabhdaware eb6bfc7
feat: update ssr-html example with SSR docs code
saurabhdaware e5eedeb
fix: error
poyoho cced917
fix: pass for hmr
poyoho b650fd6
chore: update, wip
patak-dev 1bf08ff
fix: handle js and css proxies for virtual html
patak-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Updated this code to be a bit similar to SSR docs example
This one is failing with unresolved path error now
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.
#7993 (comment) this can solve the issue. Is that expected behaviour?
Was wondering what exactly is the solution-
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.
We can update the docs in v3 if we think that is the correct way forward, but this was working before and documented so we should merge a fix in 2.9 that works as it is currently documented:
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.
You can watch
resolve
plugin to know how vite internal resolveId work. So you can set the package.json>main field to avoid the error.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.
@poyoho do you see an issue with adding this logic:
to
transformIndexHtml
?Or would it later fail in
render
(https://vitejs.dev/guide/ssr.html#setting-up-the-dev-server)Since we are asking users to add the
index.html
by hand, why not add it ourselves when needed so we avoid breaking these cases? Maybe we could emit a warning later saying that in v3 this will not be supported and they have to pass a complete path?