File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { promisify } from 'node:util'
44import colors from 'picocolors'
55import type { Plugin } from 'rollup'
66import type { ResolvedConfig } from '../config'
7- import { isDefined , normalizePath } from '../utils'
7+ import { isDefined , isInNodeModules , normalizePath } from '../utils'
88import { LogLevels } from '../logger'
99
1010const groups = [
@@ -122,9 +122,10 @@ export function buildReporterPlugin(config: ResolvedConfig): Plugin {
122122 // the same chunk. The intersecting dynamic importers' dynamic import is not
123123 // expected to work. Note we're only detecting the direct ineffective
124124 // dynamic import here.
125- if (
126- module . dynamicImporters . some ( ( m ) => chunk . moduleIds . includes ( m ) )
127- ) {
125+ const detectedIneffectiveDynamicImport = module . dynamicImporters . some (
126+ ( id ) => ! isInNodeModules ( id ) && chunk . moduleIds . includes ( id ) ,
127+ )
128+ if ( detectedIneffectiveDynamicImport ) {
128129 this . warn (
129130 `\n(!) ${
130131 module . id
You can’t perform that action at this time.
0 commit comments