M
M
MRcracker2021-06-24 20:06:39
Sass
MRcracker, 2021-06-24 20:06:39

How to properly import one file into another?

Hello. I use gulp and the scss preprocessor. I'm trying to import one file into another.

To do this, I add @ import "_header";to the beginning of the file (which should be imported by another file)

In the original scss file, I get @import "_header";everything. The code is not added. There are no compilation errors. What could be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Dubrovin, 2021-06-25
@alekcena

Files that are used in others start with an underscore.
In the file itself, the connection goes without underlining.

// _header - что нужно подключить
@import "header";

It's in the documentation . Which is written to help optimize the work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question