Skip to content

“native config loader incompatibilities” warning is shown even when setting a bundler explicitly #23267

Description

@flying-sheep

When not using the default config loader, the warnings shouldn’t be shown.

At least not until other config loaders are deprecated, which they currently shouldn’t, as the native loader breaks certain configurations with no workaround (see here)

plugins: [
!process.env.VITE_CONFIG_NATIVE_IGNORE_WARNING &&
createNativeConfigCompatPlugin(nativeIncompatibilities),

if (bundled.nativeIncompatibilities.length > 0) {
const logger = createLogger(logLevel, { customLogger })
logger.warn(
formatNativeConfigIncompatWarning(

To reproduce, just call vite build --config-loader=bundle with e.g. an import from ./some-js-file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions