Title: stylePreprocessorOptions not used for unit tests · Issue #4200 · angular/angular-cli · GitHub
Open Graph Title: stylePreprocessorOptions not used for unit tests · Issue #4200 · angular/angular-cli
X Title: stylePreprocessorOptions not used for unit tests · Issue #4200 · angular/angular-cli
Description: Please provide us with the following information: OS? Mac OSX El Capitan Versions. Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here: angular-cli: 1.0.0-beta.26 node...
Open Graph Description: Please provide us with the following information: OS? Mac OSX El Capitan Versions. Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the resu...
X Description: Please provide us with the following information: OS? Mac OSX El Capitan Versions. Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the ...
Opengraph URL: https://github.com/angular/angular-cli/issues/4200
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stylePreprocessorOptions not used for unit tests","articleBody":"> Please provide us with the following information:\r\n> ---------------------------------------------------------------\r\n\r\n### OS?\r\nMac OSX El Capitan\r\n\r\n### Versions.\r\n> Please run `ng --version`. If there's nothing outputted, please run in a Terminal: `node --version` and paste the result here:\r\n\r\nangular-cli: 1.0.0-beta.26\r\nnode: 6.9.1\r\nos: darwin x64\r\n@angular/common: 2.4.4\r\n@angular/compiler: 2.4.4\r\n@angular/core: 2.4.4\r\n@angular/forms: 2.4.4\r\n@angular/http: 2.4.4\r\n@angular/platform-browser: 2.4.4\r\n@angular/platform-browser-dynamic: 2.4.4\r\n@angular/router: 3.4.4\r\n@angular/compiler-cli: 2.4.4\r\n@angular/tsc-wrapped: 0.5.1\r\n\r\n### Repro steps.\r\n> Was this an app that wasn't created using the CLI? What change did you do on your code? etc.\r\n\r\nMake use of the recently added \"stylePreprocessorOptions\" in angular-cli.json in combination with stylus (https://github.com/angular/angular-cli/pull/4003).\r\n\r\nThis is my config:\r\n```\r\n\"stylePreprocessorOptions\": {\r\n \"includePaths\": [\r\n \"../node_modules/bootstrap-styl\",\r\n \"../node_modules/bootstrap-styl/stylus\",\r\n \"styles\"\r\n ]\r\n },\r\n```\r\n\r\nIn a *.component.styl stylus file I added `@import('globals')` which resolves to `src/styles/globals.styl`. With ng serve it works, but ng test fails.\r\n\r\n### The log given by the failure.\r\n```\r\nError: Module build failed: Error: /Users/patrick/dev/leanix-pathfinder-web/src/app/app.component.styl:1:25\r\n 1| @require('lib/constants')\r\n ------------------------------^\r\n 2|\r\n 3| .App\r\n 4| padding-top: 51px\r\n\r\n failed to locate @require file lib/constants.styl\r\n\r\n at CachedPathEvaluator.visitImport (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus-loader/lib/evaluator.js:157:21)\r\n at CachedPathEvaluator.Visitor.visit (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/index.js:28:40)\r\n at CachedPathEvaluator.Evaluator.visit (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/evaluator.js:160:18)\r\n at CachedPathEvaluator.Evaluator.visitRoot (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/evaluator.js:707:27)\r\n at CachedPathEvaluator.Visitor.visit (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/index.js:28:40)\r\n at CachedPathEvaluator.Evaluator.visit (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/evaluator.js:160:18)\r\n at CachedPathEvaluator.Evaluator.evaluate (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/evaluator.js:247:15)\r\n at Renderer.render (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/renderer.js:86:26)\r\n at /Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus-loader/index.js:163:12\r\n at tryCatchReject (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/makePromise.js:840:30)\r\n at runContinuation1 (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/makePromise.js:799:4)\r\n at Fulfilled.when (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/makePromise.js:590:4)\r\n at Pending.run (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/makePromise.js:481:13)\r\n at Scheduler._drain (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/Scheduler.js:62:19)\r\n at Scheduler.drain (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/Scheduler.js:27:9)\r\n at _combinedTickCallback (internal/process/next_tick.js:67:7)\r\n at process._tickCallback (internal/process/next_tick.js:98:9)\r\n at src/test.ts:279131\r\n```\r\n\r\n### Mention any other details that might be useful.\r\n\r\nI have found that in `models/webpack-build-test.js` the stylus-load has no configuration as it does here: https://github.com/angular/angular-cli/pull/4003/files#diff-422be7f05c4af54ddd02152bfc358260R79 \r\n\r\nI think it should be added there as well!?\r\n\r\n> ---------------------------------------------------------------\r\n> Thanks! We'll be in touch soon.\r\n","author":{"url":"https://github.com/psurrey","@type":"Person","name":"psurrey"},"datePublished":"2017-01-24T12:21:03Z","url":"https://github.com/angular/angular-cli/issues/4200"}
| 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:976788b9-52bf-ed8e-5731-b0335992e28b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8760:27E5CD:3DF272F:4F29824:6B02096C |
| html-safe-nonce | 1dbaed8b4904b8f711a80caeadfd45f16eeb1cd9b46102167fe8a618429e3619 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzYwOjI3RTVDRDozREYyNzJGOjRGMjk4MjQ6NkIwMjA5NkMiLCJ2aXNpdG9yX2lkIjoiOTIwNjM1NzI2ODAwODkyOTY0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 83ce4b3a3b90d0ea2b8fcffeb730cbdf9403e57ee38dfdbce31937af83fababd |
| hovercard-subject-tag | issue:202803479 |
| 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/4200/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a7ceb1d32c5a872b291a3d7125eeae5dbdf492e6aa6f31b454c637e44fa16100/angular/angular-cli/issues/4200 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a7ceb1d32c5a872b291a3d7125eeae5dbdf492e6aa6f31b454c637e44fa16100/angular/angular-cli/issues/4200 |
| og:image:alt | Please provide us with the following information: OS? Mac OSX El Capitan Versions. Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the resu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | psurrey |
| 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