Skip to content
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

fix: relative base code generation (previously generated as ./) #7905

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"acorn": "^8.7.0",
"cac": "6.7.9",
"chokidar": "^3.5.3",
"colorette": "^2.0.16",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

"connect": "^3.7.0",
"connect-history-api-fallback": "^1.6.0",
"convert-source-map": "^1.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/importAnalysisBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
? `'modulepreload'`
: `(${detectScriptRel.toString()})()`
const assetsURL = hasCustomAssetFileNames
? config.base
? JSON.stringify(config.base)
: isRelativeBase(config.base)
? `new URL('./',import.meta.url).pathname`
: JSON.stringify(path.posix.join(config.base, config.build.assetsDir, '/'))
Expand Down
17 changes: 16 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.