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

feat: support base option during dev #1556

Merged
merged 20 commits into from Jan 22, 2021
Merged

feat: support base option during dev #1556

merged 20 commits into from Jan 22, 2021

Conversation

bompus
Copy link
Contributor

@bompus bompus commented Jan 16, 2021

This adds the base option as root level config.base. It propagates down to config.build.base to prevent any plugins from breaking that are referencing config.build.base

Issue: #833

@bompus
Copy link
Contributor Author

bompus commented Jan 22, 2021

As noted, rebased for 52ae44f

@yyx990803 yyx990803 merged commit 809d4bd into vitejs:main Jan 22, 2021
@ais-one
Copy link
Contributor

ais-one commented Jan 23, 2021

Should this have a deprecation notice or breaking change in the changelog later when released...?

@yyx990803
Copy link
Member

It is backwards compatible and there are deprecation warnings.

if (!BASE_URL.startsWith('/') || !BASE_URL.endsWith('/')) {
logger.warn(
chalk.bold.yellow(
`(!) "base" config option should start and end with "/".`
Copy link
Member

Choose a reason for hiding this comment

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

This is wrong. The base option can be a https:// URL too.

/cc @yyx990803

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants