You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`${yellow(dep)} is located in ${blue`node_modules`} but is not included in ${blue`deps.onlyAllowBundle`} option.\n`+
235
-
`To fix this, either add it to ${blue`deps.onlyAllowBundle`}, declare it as a production or peer dependency in your package.json, or externalize it manually.\n`+
236
-
`Imported by\n${[...(importers.get(dep)||[])]
237
-
.map((s)=>`- ${underline(s)}`)
238
-
.join('\n')}`,
239
-
)
240
-
if(errors.length){
241
-
this.error(errors.join('\n\n'))
242
-
}
243
-
244
-
constunusedPatterns=onlyAllowBundle.filter(
245
-
(pattern)=>
246
-
!Array.from(deps).some((dep)=>
247
-
matchPattern(dep,[pattern]),
248
-
),
249
-
)
250
-
if(unusedPatterns.length){
251
-
logger.info(
252
-
nameLabel,
253
-
`The following entries in ${blue`deps.onlyAllowBundle`} are not used in the bundle:\n${unusedPatterns
254
-
.map((pattern)=>`- ${yellow(pattern)}`)
255
-
.join(
256
-
'\n',
257
-
)}\nConsider removing them to keep your configuration clean.`,
258
-
)
259
-
}
260
-
}elseif(deps.size){
261
-
logger.info(
262
-
nameLabel,
263
-
`Hint: consider adding ${blue`deps.onlyAllowBundle`} option to avoid unintended bundling of dependencies, or set ${blue`deps.onlyAllowBundle: false`} to disable this hint.\n`+
264
-
`See more at ${underline`https://tsdown.dev/options/dependencies#deps-onlyallowbundle`}\n`+
265
-
`Detected dependencies in bundle:\n${Array.from(deps)
`${yellow(dep)} is located in ${blue`node_modules`} but is not included in ${blue`deps.onlyAllowBundle`} option.\n`+
262
+
`To fix this, either add it to ${blue`deps.onlyAllowBundle`}, declare it as a production or peer dependency in your package.json, or externalize it manually.\n`+
`The following entries in ${blue`deps.onlyAllowBundle`} are not used in the bundle:\n${unusedPatterns
279
+
.map((pattern)=>`- ${yellow(pattern)}`)
280
+
.join(
281
+
'\n',
282
+
)}\nConsider removing them to keep your configuration clean.`,
283
+
)
284
+
}
285
+
}elseif(onlyAllowBundle==null&&deps.size){
286
+
logger.info(
287
+
nameLabel,
288
+
`Hint: consider adding ${blue`deps.onlyAllowBundle`} option to avoid unintended bundling of dependencies, or set ${blue`deps.onlyAllowBundle: false`} to disable this hint.\n`+
289
+
`See more at ${underline`https://tsdown.dev/options/dependencies#deps-onlyallowbundle`}\n`+
290
+
`Detected dependencies in bundle:\n${Array.from(deps)
0 commit comments