question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] Use Sass from another package

See original GitHub issue

Type of Issue

[ ] Bug Report
[ ] Feature Request
[x] Question

Description

I have a Sass file that I packaged in an npm package. (pie-theme.scss) This is a dependency of my pie-carousel component. I am able to use the style in that component by doing an @import '~pie-theme/pie-theme.scss';

However when I package pie-carousel and try to use it in another application the style are not there. I am probably missing something obvious… Please can you help?

Version Information

node_modules/.bin/ng-packagr --version
ng-packagr:            3.0.1
@angular/compiler:     5.2.11
rollup:                0.59.4
tsickle:               0.27.5
typescript:            2.5.3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ghostcommented, Sep 27, 2018

While trying to provide a reproduction example, I solved my issue! However, I found another very similar.

It seems the assets (images) are not packaged by default. Please have a look at this repo: https://github.com/HoplaGeiss/packagr-example I created a component that has a div with a background color from another dependency and an icon. That component is then package and used in another application, the div appears fine, but the icon doesn’t. More details in the readme of that repo.

how did you solve it??

0reactions
github-actions[bot]commented, Jun 19, 2020

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing SASS from another npm package - Stack Overflow
I have found similar question here: Importing Sass through npm, but I would rather avoid some workarounds. IMHO, this should be doable in...
Read more >
How to import SASS through npm ? - GeeksforGeeks
First, download the latest version of a node in the system and install it. Now go to command prompt and address the folder...
Read more >
Sass: @extend
When one class extends another, Sass styles all elements that match the extender as though they also match the class being extended. When...
Read more >
Sass @import is being replaced with @use and @forward
My course: Responsive Design for Beginners! https://coder-coder.com/responsive/ Become a full-stack web dev with Zero to Mastery: ...
Read more >
sass-loader - npm
This allows you to control the versions of all your dependencies, and to choose which Sass implementation to use. Note. We highly recommend ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found