Open PredragNa opened 6 months ago
@PredragNa
you can try to use the modern html-bundler-webpack-plugin. This plugin supports EJS
and many others templating engines out of the box.
The plugin replaces the functionality of the plugins and loaders:
P.S. the template-ejs-loader
has not been updated for the last 2 years. It's time to switch to an actual HTML Bundler Plugin.
@webdiscus Thank you very much. I'll take a look.
I use template-ejs-loader on all my projects but on the latest upgrade of HTMLWebpackPlugin and HTML loader packages I can't use it since there is an error. The main problem is on the 88-th line of code where we check whether
plugin.options.template === this.resource
in this scenario we never pass the test because this.resource is something like:D:\[path_to_file]\index.ejs
and plugin.options.template isD:\[path_to_project]\node_modules\.pnpm\html-webpack-plugin@5.6.0_webpack@5.90.3\node_modules\html-webpack-plugin\lib\loader.js!D:\[path_to_file]\index.ejs
I found out that this will solve the problem:
Can you consider in the near future and fix it so that it works on the latest versions of the mentioned plugins.