File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/plugin-rsc/src/plugins Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ import path from 'node:path'
5
5
import fs from 'node:fs'
6
6
import * as esModuleLexer from 'es-module-lexer'
7
7
import { transformCjsToEsm } from '../transforms/cjs'
8
+ import { createDebug } from '@hiogawa/utils'
9
+
10
+ const debug = createDebug ( 'vite-rsc:cjs' )
8
11
9
12
export function cjsModuleRunnerPlugin ( ) : Plugin [ ] {
10
13
// use-sync-external-store is known to work fine so don't show warning
@@ -43,7 +46,7 @@ export function cjsModuleRunnerPlugin(): Plugin[] {
43
46
// warning once per package
44
47
const packageKey = extractPackageKey ( id )
45
48
if ( ! warnedPackages . has ( packageKey ) ) {
46
- this . warn (
49
+ debug (
47
50
`Found non-optimized CJS dependency in '${ this . environment . name } ' environment. ` +
48
51
`It is recommended to add the dependency to 'environments.${ this . environment . name } .optimizeDeps.include'.` ,
49
52
)
You can’t perform that action at this time.
0 commit comments