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
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)
vite/packages/vite/src/node/config.ts
Lines 2550 to 2552 in dcf88bd
vite/packages/vite/src/node/config.ts
Lines 2491 to 2494 in dcf88bd
To reproduce, just call
vite build --config-loader=bundlewith e.g. an import from./some-js-file