Title: Module resolution is broken when wildcard path exists · Issue #10376 · angular/angular-cli · GitHub
Open Graph Title: Module resolution is broken when wildcard path exists · Issue #10376 · angular/angular-cli
X Title: Module resolution is broken when wildcard path exists · Issue #10376 · angular/angular-cli
Description: Versions _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| |___/ Ang...
Open Graph Description: Versions _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__...
X Description: Versions _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\...
Opengraph URL: https://github.com/angular/angular-cli/issues/10376
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Module resolution is broken when wildcard path exists","articleBody":"### Versions\r\n```\r\n _ _ ____ _ ___\r\n / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|\r\n / △ \\ | '_ \\ / _` | | | | |/ _` | '__| | | | | | |\r\n / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\r\n/_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\r\n |___/\r\n \r\nAngular CLI: 1.7.4\r\nNode: 9.9.0\r\nOS: darwin x64\r\nAngular: 5.2.10\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, language-service, platform-browser\r\n... platform-browser-dynamic, router\r\n\r\n```\r\n\r\n### Repro steps\r\n\r\nAdd the following to tsconfig.json:\r\n\r\n1. Create a new CLI project:\r\n\r\n`ng new angular-cli-is-broken`\r\n\r\n2. Add a wildcard path mapping to the tsconfig:\r\n\r\n```js\r\n\"paths\": {\r\n \"*\": [\"./src/app/*\"]\r\n}\r\n```\r\n\r\n3. Build the project:\r\n\r\n```\r\nnpm run build\r\n```\r\n\r\n### Observed behavior\r\n\r\nResolution of modules does not work:\r\n\r\n```\r\nERROR in ./src/app/app.module.ngfactory.js\r\nModule not found: Error: Can't resolve '/Users/jon/GitHub/angular-cli-is-broken/src/src/app/@angular/common' in '/Users/jon/GitHub/angular-cli-is-broken/src/app'\r\n```\r\n\r\nEtc.\r\n\r\n\r\n### Desired behavior\r\n\r\nIt should resolve modules correctly, as it did in 1.6.\r\n\r\n### Mention any other details that might be useful (optional)\r\n\r\nThis worked perfectly in 1.6. You can confirm this by regressing the CLI version in package.json to 1.6, and confirming that `ng build` now works.\r\n\r\n","author":{"url":"https://github.com/jonrimmer","@type":"Person","name":"jonrimmer"},"datePublished":"2018-04-18T11:17:50Z","url":"https://github.com/angular/angular-cli/issues/10376"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:63cbeb72-afd7-225a-c9d9-d63d481c6120 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9954:3A73AA:35773BD:43C028C:6B021B7A |
| html-safe-nonce | b9a42db09c678c7e5849612909aec1976af8f6697d9d9150367c948fb28a63b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTU0OjNBNzNBQTozNTc3M0JEOjQzQzAyOEM6NkIwMjFCN0EiLCJ2aXNpdG9yX2lkIjoiMzc1OTQyMTY3NTI2Mzg5MjM0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 10d5b9c2acb94f5e71618dff3f6035c62e2f61499a20dccd019e3f39689ed6f6 |
| hovercard-subject-tag | issue:315437274 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/10376/issue_layout |
| twitter:image | https://opengraph.githubassets.com/06374f20ea81bd858304b79a5266bf98a413fefc0ce53512665cdb017f2fdfd1/angular/angular-cli/issues/10376 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/06374f20ea81bd858304b79a5266bf98a413fefc0ce53512665cdb017f2fdfd1/angular/angular-cli/issues/10376 |
| og:image:alt | Versions _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jonrimmer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width