The problem of vue using ejs as the page of entry file

vue is a page that uses index.html as the entry by default, and app.js will be inserted into the page during compilation

clipboard.png

ejsjs;

1,webpack,app.jshtml
2,ejs

clipboard.png

address of Code Cloud: https://gitee.com/nana5238/ex...

think about this thing for the first time, please correct it, thank you


this is usually done by webpack's htmlplugin plug-in


solved, treat ejs as html

app.engine('.html', require('ejs').renderFile);
app.set('view engine', 'html');
Menu