Skip to content

feat: support base option during dev - #1556

Merged
yyx990803 merged 20 commits into
vitejs:mainfrom
bompus:config.server.base
Jan 22, 2021
Merged

yyx990803 merged 20 commits into
vitejs:mainfrom
bompus:config.server.base

Conversation

@bompus

@bompus bompus commented Jan 16, 2021 •

Copy link
Copy Markdown
Contributor

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

bompus commented Jan 22, 2021 •

Copy link
Copy Markdown
Contributor Author

As noted, rebased for 52ae44f

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

ais-one commented Jan 23, 2021 •

Copy link
Copy Markdown
Contributor

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

@yyx990803

Copy link
Copy Markdown
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 "/".`

@aleclarson aleclarson Jan 23, 2021 •

Copy link
Copy Markdown
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.

4 participants