Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pug unbuffered code don't includes #91

Open
var-bp opened this issue Apr 15, 2017 · 2 comments
Open

Pug unbuffered code don't includes #91

var-bp opened this issue Apr 15, 2017 · 2 comments

Comments

@var-bp
Copy link

var-bp commented Apr 15, 2017

Hi, I have problem with bemto.pug when using with webpack 2 pug-loader. All files with only unbuffered code inside (helpers.pug and tag_metadata.pug) don't includes/compiles.

Only solution that I find is to take all unbuffered code from helpers.pug and tag_metadata.pug to index.pug and write it in one line each.

// don't work
-
  var get_bemto_tag_type = function(tagName) {
    var result = 'block'
    if (bemto_tag_metadata[tagName]) {
      result = bemto_tag_metadata[tagName].type || result;
    }
    return result;
  }

// work
- var get_bemto_tag_type = function(tagName) { var result = 'block'; if (bemto_tag_metadata[tagName]) { result = bemto_tag_metadata[tagName].type || result; } return result; }

It seems to me that the same problem should be with Gulp too. To write plugins it would be ideal if the bemto.pug was one big file.

@kizu
Copy link
Owner

kizu commented Apr 25, 2017

That seems to be loaders' or pug's problem, but I have plans to compile pug automatically into one file before publishing to npm, when I'll get to it, this issue would be fixed I guess.

@var-bp
Copy link
Author

var-bp commented Apr 25, 2017

Thank you so much 😄 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants