J
J
Jun18012018-12-27 07:30:32
JavaScript
Jun1801, 2018-12-27 07:30:32

Why are css selectors duplicated (SCSS)?

I have one .scss file that is included 4 times in other .scss files, why is the content of this file included 4 times in bundle.css? How to solve this problem?
file_1.scss:

.header_video_titles {
    margin-top: 10%;
}

file_2.scss, file_3.scss, file_4.scss: As a result, bundle.css contains:
@import "file_1.scss"
.header_video_titles {
    margin-top: 10%;
}
.header_video_titles {
    margin-top: 10%;
}
.header_video_titles {
    margin-top: 10%;
}
.header_video_titles {
    margin-top: 10%;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jun1801, 2018-12-27
@Jun1801

Solution, posons: https://www.npmjs.com/package/optimize-css-assets-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question