-
-
Notifications
You must be signed in to change notification settings - Fork 7k
feat(create-vite): set default title in index.html to project name #20519
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
Open
Copilot
wants to merge
6
commits into
main
Choose a base branch
from
copilot/fix-15397ff1-c3a1-4b95-a80e-83c976f6e1e6
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
Copilot finished work on behalf of
sapphi-red
July 31, 2025 17:56
sapphi-red
requested changes
Aug 1, 2025
…d clean up test Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
Copilot finished work on behalf of
sapphi-red
August 1, 2025 06:40
sapphi-red
requested changes
Aug 1, 2025
… titles Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
Copilot finished work on behalf of
sapphi-red
August 1, 2025 07:22
sapphi-red
requested changes
Aug 1, 2025
… all templates Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot finished work on behalf of
sapphi-red
August 1, 2025 07:32
sapphi-red
reviewed
Aug 1, 2025
sapphi-red
approved these changes
Aug 1, 2025
bluwy
approved these changes
Aug 5, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feat: create-vite
create-vite package
p2-nice-to-have
Not breaking anything but nice to have (priority)
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.
This PR implements the feature requested in #20111 to set the default title in
index.html
to the project name instead of framework-specific titles like "Vite + React", "Vite + Vue", etc.Problem
Currently, all Vite projects created with
create-vite
have generic titles in theirindex.html
files that reflect the framework used (e.g., "Vite + React", "Vite + Vue"). This creates several issues:Solution
This PR modifies the
create-vite
scaffolding process to automatically replace the<title>
content with the project name provided by the user using regex pattern matching.Implementation Details
index.html
files maintain their original framework-specific titleswrite
function increate-vite/src/index.ts
to detectindex.html
files and use regex (/<title>.*?<\/title>/
) to replace the title content with the project nameBefore/After Example
Before:
After:
Templates Affected
All 16 template variants now get dynamic title replacement:
template-react
,template-react-ts
template-vue
,template-vue-ts
template-svelte
,template-svelte-ts
template-vanilla
,template-vanilla-ts
template-preact
,template-preact-ts
template-qwik
,template-qwik-ts
template-solid
,template-solid-ts
template-lit
,template-lit-ts
Backwards Compatibility
This change is fully backwards compatible - it only affects newly created projects and doesn't impact existing functionality or workflows.
Fixes #20111
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.