Javascript 网页包2-文件加载程序[路径]选项
我使用webpacks文件加载器从一个文件夹中的pug模板输出一堆编译好的html文件 我想将html文件放在输出目录中,与它们在源Javascript 网页包2-文件加载程序[路径]选项,javascript,node.js,webpack,webpack-file-loader,Javascript,Node.js,Webpack,Webpack File Loader,我使用webpacks文件加载器从一个文件夹中的pug模板输出一堆编译好的html文件 我想将html文件放在输出目录中,与它们在源/pug/文件夹中时所处的文件夹结构相同,但不包括pug文件夹本身 例如,如果在/pug/文件夹中,一个文件是/pug/layouts/index.pug,另一个文件是/pug/templates/main/index.pug,我试图将输出的html文件发送到/dist/layouts/index.html和/dist/templates/main/index.ht
/pug/
文件夹中时所处的文件夹结构相同,但不包括pug文件夹本身
例如,如果在/pug/
文件夹中,一个文件是/pug/layouts/index.pug
,另一个文件是/pug/templates/main/index.pug
,我试图将输出的html文件发送到/dist/layouts/index.html
和/dist/templates/main/index.html
我使用的是
文件加载器?name=[path][name].html
,但这样会产生/dist/pug/layouts/index.html
-注意pug文件夹。我不知道如何摆脱它,有什么想法吗?结果文件加载器接受一个context=./path
查询参数
因此,这是有效的“文件加载器?名称=[path][name].html&context=./pug”