File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,11 @@ const bundle = (process.argv[3] || 'bundle');
4040
4141/**
4242 * @param {string } name The file name to turn into a Regular expression
43+ * @param {string } tail Additional regexp to include after the file path
4344 * @return {RegExp } The regular expression for the name,
4445 */
45- function fileRegExp ( name ) {
46- return new RegExp ( name . replace ( / ( [ \\ . { } [ \] ( ) ? * ^ $ ] ) / g, '\\$1' ) , 'g' ) ;
46+ function fileRegExp ( name , tail = '' ) {
47+ return new RegExp ( name . replace ( / ( [ \\ . { } [ \] ( ) ? * ^ $ ] ) / g, '\\$1' ) + tail , 'g' ) ;
4748}
4849
4950/**
@@ -63,7 +64,7 @@ const mjPath = path.dirname(compPath);
6364const jsPath = path . join ( __dirname , '..' , '..' , target ) ;
6465const compRE = fileRegExp ( compPath ) ;
6566const rootRE = fileRegExp ( path . dirname ( jsPath ) ) ;
66- const nodeRE = fileRegExp ( nodePath ) ;
67+ const nodeRE = fileRegExp ( nodePath , '(?:/\\.pnpm/.*?/node_modules)?' ) ;
6768const fontRE = new RegExp ( '^.*\\/(mathjax-[^\/-]*)(?:-font)?\/(build|[cm]js)' ) ;
6869
6970/**
You can’t perform that action at this time.
0 commit comments