Skip to content

Commit 33b0d5a

Browse files
authoredNov 13, 2024··
build: ignore cjs warning (#18660)
1 parent 95c4b3c commit 33b0d5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎packages/vite/rollup.config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ function exportCheck(): Plugin {
352352
async writeBundle() {
353353
// escape import so that it's not bundled while config load
354354
const dynImport = (id: string) => import(id)
355+
// ignore warning from CJS entrypoint to avoid misleading logs
356+
process.env.VITE_CJS_IGNORE_WARNING = 'true'
355357

356358
const esmNamespace = await dynImport('./dist/node/index.js')
357359
const cjsModuleExports = (await dynImport('./index.cjs')).default

0 commit comments

Comments
 (0)
Please sign in to comment.