-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
The build fails when trying to perform a build involving a requirejs dependency which also requires other files.
In this case the following error appears:
Field 'browser' doesn't contain a valid alias configuration
The error does not occur if the required file dependency has no dependencies, and it appears to have been introduced after 1.2.6. This affects both jit & aot builds.
Bug Report or Feature Request (mark with an x
)
- [ X] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.4.7
node: 8.5.0
os: darwin x64
@angular/animations: 4.4.5
@angular/common: 4.4.5
@angular/compiler: 4.4.5
@angular/core: 4.4.5
@angular/forms: 4.4.5
@angular/http: 4.4.5
@angular/platform-browser: 4.4.5
@angular/platform-browser-dynamic: 4.4.5
@angular/router: 4.4.5
@angular/cli: 1.4.7
@angular/compiler-cli: 4.4.5
@angular/language-service: 4.4.5
typescript: 2.3.4
Repro steps.
Example Repository
Using 1.2.6 of the cli will build correctly.
- ng new project
- add requirejs
- add path inside tsconfig
- require a file using the path
At this stage the project builds and runs as expected.
However if the required file has other dependencies they will not be resolved and the build breaks.
The log given by the failure.
Desired functionality.
Nested modules should resolve correctly.
Mention any other details that might be useful.
The regression was introduced after 1.2.6.
The example repo was built with cli 1.4.7.
Related Issue Related Issue 7341