-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
Hi, I tried help here (pugjs/pug#3164) before.
Pug Version: 2.0.4
Node Version: v11.10.0
Input JavaScript Values
new HtmlWebpackPlugin({
hash: true,
template: './src/index.pug'
}),Input Pug
- var css = require('./person-css.json');
- var variables = require('../../variables.json');
mixin person(image, subtitle, link)
h1(class=css.title) - var css = require('./section-css.json');
include ../person/person
section(class=css.host)
+person('Person')Additional Comments
If I remove mixin, require works fine and compile as expected. But when I used mixin I get the follows errors:
ERROR in ./src/index.pug (./node_modules/html-webpack-plugin/lib/loader.js!./src/index.pug)
Module not found: Error: Can't resolve '../../variables.json' in 'my-project/src'
@ ./src/index.pug (./node_modules/html-webpack-plugin/lib/loader.js!./src/index.pug) 7:16-47
ERROR in ./src/index.pug (./node_modules/html-webpack-plugin/lib/loader.js!./src/index.pug)
Module not found: Error: Can't resolve './person-css.json' in 'my-project/src'
@ ./src/index.pug (./node_modules/html-webpack-plugin/lib/loader.js!./src/index.pug) 6:10-38Maybe this is an issue for pug-loader.
Thanks!
Libida, tasay-eng, acsabi310, VladislavRUS, ballaneypranav and 1 more
Metadata
Metadata
Assignees
Labels
No labels