File tree 1 file changed +1
-6
lines changed
packages/browser/src/node 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ export default (browserServer: BrowserServer, base = '/'): Plugin[] => {
22
22
const distRoot = resolve ( pkgRoot , 'dist' )
23
23
const project = browserServer . project
24
24
25
- let loupePath : string
26
-
27
25
return [
28
26
{
29
27
enforce : 'pre' ,
@@ -228,11 +226,8 @@ export default (browserServer: BrowserServer, base = '/'): Plugin[] => {
228
226
return resolve ( distRoot , 'client' , id . slice ( 1 ) )
229
227
}
230
228
} ,
231
- configResolved ( config ) {
232
- loupePath = resolve ( config . cacheDir , 'deps/loupe.js' )
233
- } ,
234
229
transform ( code , id ) {
235
- if ( id . startsWith ( loupePath ) ) {
230
+ if ( id . includes ( browserServer . vite . config . cacheDir ) && id . includes ( 'loupe.js' ) ) {
236
231
// loupe bundle has a nastry require('util') call that leaves a warning in the console
237
232
const utilRequire = 'nodeUtil = require_util();'
238
233
return code . replace ( utilRequire , ' ' . repeat ( utilRequire . length ) )
You can’t perform that action at this time.
0 commit comments