Replies: 3 comments
-
Hello @myasarbardaklar, rendering a pug to HTML using the I use the simple mixin mixin debug(data)
pre
code= JSON.stringify(data, JSON_PRETTY_PRINT, 2) The output a variable in pug: -
const data = {
key: 'value',
list: [1, 2, 3]
};
h2 Output of data:
+debug(data) Then you can see the
|
Beta Was this translation helpful? Give feedback.
-
Thank you so much. But when i add an image and when i wanna debug the result its like this: |
Beta Was this translation helpful? Give feedback.
-
yes, because pug-loader resolve the absolute path of source file in pug. But you can use the query parameter - const srcSet = require('../img/astronaft.jpg?prop=srcSet');
p= srcSet |
Beta Was this translation helpful? Give feedback.
-
Is there any way to debug in pug file? For example when i require an image, i wanna debug it with console.log and i wanna see the results in terminal. But if your plugin's method is "render" or "compile", i cannot see the results in terminal.
Beta Was this translation helpful? Give feedback.
All reactions