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[] {
74
74
75
75
const startMarker = '/*! extract tokens start */' ;
76
76
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' ) ;
79
80
const { prepend, append} = getTokenExtractionCode (
80
81
srcPath ,
81
82
themePath ,
@@ -93,6 +94,16 @@ function extractTokens(themePath: string): Token[] {
93
94
compileString ( toCompile , {
94
95
loadPaths : [ srcPath ] ,
95
96
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
+ ] ,
96
107
sourceMap : false ,
97
108
logger : {
98
109
debug : message => {
You can’t perform that action at this time.
0 commit comments