File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,9 @@ function extractTokens(themePath: string): Token[] {
7474
7575 const startMarker = '/*! extract tokens start */' ;
7676 const endMarker = '/*! extract tokens end */' ;
77- const absoluteThemePath = join ( process . cwd ( ) , themePath ) ;
78- const srcPath = join ( process . cwd ( ) , 'src' ) ;
77+ const root = process . cwd ( ) ;
78+ const absoluteThemePath = join ( root , themePath ) ;
79+ const srcPath = join ( root , 'src' ) ;
7980 const { prepend, append} = getTokenExtractionCode (
8081 srcPath ,
8182 themePath ,
@@ -93,6 +94,16 @@ function extractTokens(themePath: string): Token[] {
9394 compileString ( toCompile , {
9495 loadPaths : [ srcPath ] ,
9596 url : pathToFileURL ( absoluteThemePath ) ,
97+ importers : [
98+ {
99+ findFileUrl : ( url : string ) => {
100+ const angularPrefix = '@angular/' ;
101+ return url . startsWith ( angularPrefix )
102+ ? pathToFileURL ( join ( srcPath , url . substring ( angularPrefix . length ) ) )
103+ : null ;
104+ } ,
105+ } ,
106+ ] ,
96107 sourceMap : false ,
97108 logger : {
98109 debug : message => {
You can’t perform that action at this time.
0 commit comments