Renamed main.tsx -> index.tsx for support in create-solid#259
Open
qsenn35 wants to merge 1 commit into
Open
Conversation
Author
|
Also the reason I'm making the change here is purely because it seems weird to create an edge case handler in the solid-create package |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bug:
When using
npm create solidand choosing Vanilla JS + tanstack options, it results in aindex.htmlthat contains a<script>withsrc="./src/main.tsx"rather than a valid.jsxfile.Reason:
In the
solid-cli/createpackage we have this code increateVanillaJS():This will not pattern match with tanstack templates due to the name of the import being
main.tsxinstead ofindex.tsxresulting in an error when starting the project.Fix:
Update the names in the Vanilla JS tanstack templates to contain
index.tsxinstead ofmain.tsxto allow the pattern matchup (and thus renaming) to work.From what I can tell, the only thing that really cares about the name of the entry point of tanstack related apps is the
index.htmland the solid create cli functions. Let me know if there's anywhere that needs changes due to the renaming, as I was not able to find any other places in this repo or others.