How to import css from node_modules using sass or less?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
43 views
Decided to style the grid according to instructions.
https://github.com/swimlane/ngx-datatable/blob/mas...

Set grid via npm.
Installed gulp.

Created scss, added to it
@import '~@swimlane/ngx-datatable/release/index.css'; @import '~@swimlane/ngx-datatable/release/themes/material.css'; @import '~@swimlane/ngx-datatable/release/assets/icons.css';


But in the output css file get
@import url(~@swimlane/ngx-datatable/release/index.css); @import url(~@swimlane/ngx-datatable/release/themes/material.css); @import url(~@swimlane/ngx-datatable/release/assets/icons.css);


With Less about the same situation(

Other rules of sass or less normally interpreted.
Please tell me how to import?
by | 43 views

2 Answers

0 like 0 dislike
Everything turned out using sass

@import '../node_modules/@swimlane/ngx-datatable/release/index'; @import '../node_modules/@swimlane/ngx-datatable/release/themes/material'; @import '../node_modules/@swimlane/ngx-datatable/release/assets/icons';


Only the fonts folder had the owner to copy, not sure it's good.
by
0 like 0 dislike
One of the major drawbacks of sass, is the inability to import css files.
In other preprocessors including less, there are special instructions for this. Posturite manuals.
by

Related questions

0 like 0 dislike
1 answer
asked May 22, 2019 by Hank_Moody
0 like 0 dislike
3 answers
asked Apr 1, 2019 by elmander
0 like 0 dislike
3 answers
asked Apr 1, 2019 by elmander
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Apr 26, 2019 by colorkid
110,608 questions
257,187 answers
0 comments
40,796 users