Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf31bf30

Browse files
clydindgp1130
authored andcommitted
fix(@angular-devkit/build-angular): avoid undefined module path for Sass imports in esbuild
When using Sass with the experimental esbuild-based browser application builder, bare importswithout a path segment that were available via included paths but also happen to be a node modulecould cause an exception. An example of such an import would be `@import "globals";`. The deepimport node module logic would previously attempt to join an undefined path segment to the resolvedpath for the `globals` package which would raise a argument type exception. This case has now beenfixed by only joining if there is actually a path segment present such as `@import "globals/x"`.With this fix in place, the node module case can then continue and if no stylesheet is found, theinclude paths will then be searched.(cherry picked from commitd19f260)
1 parentde15ec5 commitf31bf30

File tree

1 file changed

+5
-1
lines changed
  • packages/angular_devkit/build_angular/src/builders/browser-esbuild

1 file changed

+5
-1
lines changed

‎packages/angular_devkit/build_angular/src/builders/browser-esbuild/sass-plugin.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ async function compileString(
124124

125125
if(packageResult.path){
126126
returnpathToFileURL(
127-
join(dirname(packageResult.path),!hasScope ?nameOrFirstPath :'', ...pathPart),
127+
join(
128+
dirname(packageResult.path),
129+
!hasScope&&nameOrFirstPath ?nameOrFirstPath :'',
130+
...pathPart,
131+
),
128132
);
129133
}
130134
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp