willyelm / pug-html-loader

Pug HTML loader for webpack

Home Page:https://github.com/willyelm/pug-html-loader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to pass data when loader is used inline

7studio opened this issue · comments

Hi,
I'm not very comfortable with Webpack but I just can't use the pug-html-loader correctly in an import statement (cf.: https://webpack.js.org/concepts/loaders/#inline). The root option works well but I don't know how to pass the data option :/

example: import HTML from 'html-loader!pug-html-loader?root=my_path&data[myvar]=myvalue!./file.pug

Can someone help me to achieve it please?

Thank you,
Xavier.