Skip to content

Commit

Permalink
build: ignore cjs warning (#18660)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Nov 13, 2024
1 parent 95c4b3c commit 33b0d5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vite/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ function exportCheck(): Plugin {
async writeBundle() {
// escape import so that it's not bundled while config load
const dynImport = (id: string) => import(id)
// ignore warning from CJS entrypoint to avoid misleading logs
process.env.VITE_CJS_IGNORE_WARNING = 'true'

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

0 comments on commit 33b0d5a

Please sign in to comment.