M
M
ma4t2019-02-18 09:48:02
css
ma4t, 2019-02-18 09:48:02

How to correctly set mixins in webpack?

Hello, I've never used assemblers, I'm trying to understand from examples.
In the example, the
mixin catalog(data)
.catalog
.catalog__wrapper block
, etc. is written in the pug file like this.
sass file
$parent: catalog;
@include block ($parent) {
position: relative;
display:flex;
justify-content: space-between;
@include element ($parent, 'wrapper') {
max-width: 100%;
flex basis: 100%
transition: max-width 0.2s, flex-basis 0.2s;
etc.
I created a header folder with header.pug and .sass files
when I write styles by analogy and then run npm run build
error Module build failed
No mixin named block

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WapSter, 2019-02-18
@ma4t

Have you imported the necessary scss files in pug ? And it is very desirable, in such cases, to upload it to the repository, so that at least the source code can be viewed. @import 'file';include file.pug

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question