Closed oodzchen closed 2 years ago
Hi @oodzchen,
can you please create a small repo with reproducible issue?
P.S. Using pug loader with HtmlWebPackPlugin is deprecated, because this way is inefficiently and very terrible. The correct and very easy way to render Pug templates is to use Pug plugin.
@oodzchen
I need see your Pug template and full Webpack config. Please, complete the issue with a small repo and then reopen this issue.
@webdiscus Looks like it's because I didn't use require
on image files, I've fixed already.
I've use
PugPlugin.loader
to preprocess the pug templates in my project, only use the loader without initial the plugin. It work fine when atdevelopment
mode, but when build it inproduction
mode, all images referenced in the pug files can't compile to the output directory.Here is the code in base webpack config
How can I make it work with minimal changes, I'd like to use only the loader instead of replace all other things with
PugPlugin
.