M
M
mletov2018-05-01 11:22:32
Sass
mletov, 2018-05-01 11:22:32

How to properly import css from node_modules using sass or less?

I decided to style the grid according to the instructions.
https://github.com/swimlane/ngx-datatable/blob/mas...
Installed grid via npm.
Installed gulp.
Created scss, added to it

@import '[email protected]/ngx-datatable/release/index.css';
@import '[email protected]/ngx-datatable/release/themes/material.css';
@import '[email protected]/ngx-datatable/release/assets/icons.css';

But in the output css file I get
@import url([email protected]/ngx-datatable/release/index.css);
@import url([email protected]/ngx-datatable/release/themes/material.css);
@import url([email protected]/ngx-datatable/release/assets/icons.css);

With Less, the situation is about the same (
The rest of the sass or less rules are interpreted normally.
Please, tell me how to import correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mletov, 2018-05-01
@mletov

Everything turned out through 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 to be copied by hand, I'm not sure if this is good.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question