File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,17 @@ function createAliasPlugin() {
3131 // Intercept imports for aliased packages
3232 for ( const [ packageName , aliasPath ] of Object . entries ( aliases ) ) {
3333 // Match both exact package name and subpath imports
34- build . onResolve ( { filter : new RegExp ( `^${ packageName } (/|$)` ) } , args => {
35- // Handle subpath imports like '@socketsecurity/lib/spinner'
36- const subpath = args . path . slice ( packageName . length + 1 )
37- const resolvedPath = subpath ? path . join ( aliasPath , subpath ) : aliasPath
38- return { path : resolvedPath , external : true }
39- } )
34+ build . onResolve (
35+ { filter : new RegExp ( `^${ packageName } (/|$)` ) } ,
36+ args => {
37+ // Handle subpath imports like '@socketsecurity/lib/spinner'
38+ const subpath = args . path . slice ( packageName . length + 1 )
39+ const resolvedPath = subpath
40+ ? path . join ( aliasPath , subpath )
41+ : aliasPath
42+ return { path : resolvedPath , external : true }
43+ } ,
44+ )
4045 }
4146 } ,
4247 }
You can’t perform that action at this time.
0 commit comments