Skip to content

Commit

Permalink
feat: warn if # in project root (#14188)
Browse files Browse the repository at this point in the history
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
  • Loading branch information
2hu12 and bluwy authored Sep 15, 2023
1 parent 70a379f commit f5ba696
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,15 @@ export async function resolveConfig(
const resolvedRoot = normalizePath(
config.root ? path.resolve(config.root) : process.cwd(),
)
if (resolvedRoot.includes('#')) {
logger.warn(
colors.yellow(
`The project root contains the "#" character (${colors.cyan(
resolvedRoot,
)}), which may not work when running Vite. Consider renaming the directory to remove the "#".`,
),
)
}

const clientAlias = [
{
Expand Down

0 comments on commit f5ba696

Please sign in to comment.