negibouze / html-webpack-pug-plugin

Pug/Jade extension for the HTML Webpack Plugin
MIT License
29 stars 7 forks source link

could you Add an option of add JS files mode #24

Open zengleyi opened 3 years ago

zengleyi commented 3 years ago

could you Add an option to add JS files mode? one is 'src', the other is 'include'. use 'include',i can use this js file whithout 'public' directory,that will be very handy. you konw pug is used with express usually,express will set a public directory, so can not write '/public/' in src, but webpack not konw this set and need Absolutely right filepath, It's going to be a mess. so i use js file in pug with 'include' method,i wish this module add this option. thanks!

zengleyi commented 3 years ago

Perhaps, the right idea is to create a separate "pugwebpackplugin" plug-in, so that you can simply insert "script (SRC)" "or" include filepath "at the end of all texts without having to deal with other transactions, because EXPRESS.pug engine will deal with them.