File tree 1 file changed +4
-2
lines changed
packages/angular_devkit/build_angular/src/tools/esbuild/stylesheets
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import { readFile } from 'node:fs/promises';
11
11
import { extname , join , relative } from 'node:path' ;
12
12
import { LoadResultCache , createCachedLoad } from '../load-result-cache' ;
13
13
14
+ const CSS_RESOURCE_NAMESPACE = 'angular:css-resource' ;
15
+
14
16
/**
15
17
* Symbol marker used to indicate CSS resource resolution is being attempted.
16
18
* This is used to prevent an infinite loop within the plugin's resolve hook.
@@ -97,12 +99,12 @@ export function createCssResourcePlugin(cache?: LoadResultCache): Plugin {
97
99
// Use a relative path to prevent fully resolved paths in the metafile (JSON stats file).
98
100
// This is only necessary for custom namespaces. esbuild will handle the file namespace.
99
101
path : relative ( build . initialOptions . absWorkingDir ?? '' , result . path ) ,
100
- namespace : 'css-resource' ,
102
+ namespace : CSS_RESOURCE_NAMESPACE ,
101
103
} ;
102
104
} ) ;
103
105
104
106
build . onLoad (
105
- { filter : / ./ , namespace : 'css-resource' } ,
107
+ { filter : / ./ , namespace : CSS_RESOURCE_NAMESPACE } ,
106
108
createCachedLoad ( cache , async ( args ) => {
107
109
const resourcePath = join ( build . initialOptions . absWorkingDir ?? '' , args . path ) ;
108
110
You can’t perform that action at this time.
0 commit comments