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.

Update example on how to package lib SCSS in ng v6

See original GitHub issue

Type of Issue

Is it possible to generate css from scss in a new library project? The new angular.json file & recent cli packagr integration could perhaps expand on styling.

Is sass-bundle the way to do this? #273 How would we hook this into new project format?

Angular CLI docs on this doesn’t seem to work either.

I’m sure you’re in the process of pushing a final bits out, and docs take a backseat, but I think this is something many issues relate to, a comprehensive guide on how to integrate styles and possibly re-package them in a library so it’s emitted as a unified some-theme.css.

In my case specifically, we’re tweaking bootstrap to match our theme as well as various custom & re-wrapped components and styling is a big part of all this.

Thank you

[ ] Bug Report
[X ] Feature Request

Version Information

$ node_modules/.bin/ng-packagr --version
ng-packagr: 3.0.0-rc2
@angular/*: 6.0.0
typescript: 2.7.2

Please include all version numbers that might be relevant, e.g. third-party libraries

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:19
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

14reactions
FirstVertexcommented, Nov 14, 2018

I dislike these solutions involving a post build step. None of this can be applied when using ng build --watch=true Developer workflow with HMR goodness is lost. We need a built-in way to copy scss to dist without the post build hack.

5reactions
Itruliacommented, Jun 13, 2018

This doesn’t help with the angular/cli tho which I guess @tomgruszowski meant. Im also looking for a way to expose SCSS without having to extend @angular-devkit/build-ng-packagr:build or having another script to be executed after ng build <library> --prod

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular CLI SASS options - Stack Overflow
If you have an angular 5 project, use this command to update the config for your project. ng set defaults.styleExt scss. For Latest...
Read more >
Migrate from CSS to SCSS stylesheets for an existing Angular ...
The manual way of performing the migration i.e. using the ng cli command. Using the NPM package renamer ... Using the NPM package...
Read more >
Step by Step Guide to Upgrade Your Angular App From CSS ...
Run below command under your root Angular app path: ng config schematics.@schematics/angular:component.styleext scss.
Read more >
node-sass - npm
node-sass. 8.0.0 • Public • Published 2 months ago. Readme · Code Beta · 14 Dependencies · 12,482 Dependents · 147 Versions ...
Read more >
Creating libraries - Angular
Use the Angular CLI and the npm package manager to build and publish your library as an npm package. Angular CLI uses a...
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