How to make html-webpack-plugin not execute the ejs statement of the template, but leave it as it is?

if there is an ejs sentence in my template file

new HtmlWebpackPlugin({
  filename: "../views/index.html",
  template: "./src/templates/index.html"
})

if you execute it directly, you will get an error ReferenceError: user is not defined

.

but I think html-webpack-plugin doesn"t execute the ejs statement in template, but keeps the output as it is.

so how can I keep the output as it is?


  

do you want to cancel the ejs template feature that comes with html-webpack-plugin?
you can try using html-loader
demo: {test:/.html/, loader:'html-loader'} / / of course, other module loaders can also
and then the plug-in template uses .html as the suffix
new HtmlWebpackPlugin ({template: 'xxx.html', filename:' xxx.html'})
so that your .html will be handed over to html-loader instead of using the default ejs processing

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45896-437fc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45896-437fc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?