File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,15 @@ import { randomBytes } from 'crypto';
6
6
7
7
export default function ( opts : NodePolyfillsOptions = { } ) {
8
8
const injectPlugin = inject ( {
9
+ include : opts . include ,
10
+ exclude : opts . exclude ,
11
+ modules : {
9
12
'process' : 'process' ,
10
13
'Buffer' : [ 'buffer' , 'Buffer' ] ,
11
14
'global' : GLOBAL_PATH ,
12
15
'__filename' : FILENAME_PATH ,
13
16
'__dirname' : DIRNAME_PATH ,
17
+ }
14
18
} ) ;
15
19
const basedir = opts . baseDir || '/' ;
16
20
const dirs = new Map < string , string > ( ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ export interface NodePolyfillsOptions {
4
4
fs ?: boolean ;
5
5
crypto ?: boolean ;
6
6
baseDir ?: string ;
7
+ include ?: Array < string | RegExp > | string | RegExp | null ;
8
+ exclude ?: Array < string | RegExp > | string | RegExp | null ;
7
9
}
8
10
9
11
export function builtinsResolver ( opts : NodePolyfillsOptions ) {
You can’t perform that action at this time.
0 commit comments