Title: Stylesheet from (npm) linked package not loaded correctly · Issue #3500 · angular/angular-cli · GitHub
Open Graph Title: Stylesheet from (npm) linked package not loaded correctly · Issue #3500 · angular/angular-cli
X Title: Stylesheet from (npm) linked package not loaded correctly · Issue #3500 · angular/angular-cli
Description: OS Tested on both Windows 7 and Linux (Fedora 24) Version $ ng --version angular-cli: 1.0.0-beta.22-1 node: 4.6.1 os: linux x64 The app was created using CLI. Repro steps Install a package containing a stylesheet (say bootstrap-sass, act...
Open Graph Description: OS Tested on both Windows 7 and Linux (Fedora 24) Version $ ng --version angular-cli: 1.0.0-beta.22-1 node: 4.6.1 os: linux x64 The app was created using CLI. Repro steps Install a package containi...
X Description: OS Tested on both Windows 7 and Linux (Fedora 24) Version $ ng --version angular-cli: 1.0.0-beta.22-1 node: 4.6.1 os: linux x64 The app was created using CLI. Repro steps Install a package containi...
Opengraph URL: https://github.com/angular/angular-cli/issues/3500
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stylesheet from (npm) linked package not loaded correctly","articleBody":"### OS\r\nTested on both Windows 7 and Linux (Fedora 24)\r\n\r\n### Version\r\n```\r\n$ ng --version\r\nangular-cli: 1.0.0-beta.22-1\r\nnode: 4.6.1\r\nos: linux x64\r\n```\r\nThe app was created using CLI.\r\n\r\n### Repro steps\r\n1. Install a package containing a stylesheet (say bootstrap-sass, actually any package will do) globally via npm.\r\n2. git clone https://github.com/twbs/bootstrap-sass.git into a working directory, cd to that working directory and perform ```npm link``` command.\r\n3. ng new project in another separate directory, cd to the newly create project directory and perform ```npm link bootstrap-sass```. This will create a ```bootstrap-sass``` symlink in node_modules pointing to the local git repository.\r\n4. Modify angular-cli.json to reference the stylesheet in the linked package.\r\n```\r\n \"styles\": [\r\n \"../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss\",\r\n \"styles.scss\"\r\n ],\r\n```\r\n5. ```ng serve``` and observe that styles from bootstrap is not exported correctly in the index page.\r\n6. ```ng build``` and observe that the generated styles.bundle.js does not do \"exports.push()\".\r\n\r\n### The log given by the failure\r\nThere was no error log, webpack declared the \"bundle is now valid\".\r\n\r\n### Mention any other details that might be useful\r\nUsing normal npm install approach does not have this issue. i.e. after ```npm unlink bootstrap-sass && npm install bootstrap-sass``` then all is fine.\r\n\r\nUse case: I have a forked ```gentelella``` repository locally to fix some of the issues I found, so I cannot just simply npm install it in my project. Using npm link approach as I outlined above should work. It seems angular-cli (or webpack, I am not sure) is being confused by symlink. As a temporary workaround, I replace the stylesheet reference in the angular-cli.json with an absolute path to the stylesheet file in the local git repo.","author":{"url":"https://github.com/weitjong","@type":"Person","name":"weitjong"},"datePublished":"2016-12-09T18:26:16Z","url":"https://github.com/angular/angular-cli/issues/3500"}
| 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:1787a313-c9dc-365c-301c-643c5a24748a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4EC:2F671E:2EB2A5D:3D5D913:6B057193 |
| html-safe-nonce | df563e22f43e3eaacdd152417d0c6a6f9f2821a57d1ad6b0181473b9d11e0c4b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEVDOjJGNjcxRToyRUIyQTVEOjNENUQ5MTM6NkIwNTcxOTMiLCJ2aXNpdG9yX2lkIjoiNTI1MjczMzIzNjU5MzEyNzgyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0d05fa21c81177486c5f3bbc81ff5a648ac8067badb39d3c5f7e4be1115e83ee |
| hovercard-subject-tag | issue:194664243 |
| 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/3500/issue_layout |
| twitter:image | https://opengraph.githubassets.com/acb5b08902b1686c8c1bd095dad69753800fc2a6fa050c888301c515740d3255/angular/angular-cli/issues/3500 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/acb5b08902b1686c8c1bd095dad69753800fc2a6fa050c888301c515740d3255/angular/angular-cli/issues/3500 |
| og:image:alt | OS Tested on both Windows 7 and Linux (Fedora 24) Version $ ng --version angular-cli: 1.0.0-beta.22-1 node: 4.6.1 os: linux x64 The app was created using CLI. Repro steps Install a package containi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | weitjong |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9b4256ac5f3e310e7945ef5b71c9cb9e264357b1eb20e91d369ed6502a4c486c |
| 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 | f089e689ad324655ac44bf6cdbc04d976105b374 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width