jantimon / html-webpack-plugin

Simplifies creation of HTML files to serve your webpack bundles
MIT License
10.71k stars 1.31k forks source link

Is ejs template 'include' command not supported? #499

Closed zacard-orc closed 7 years ago

zacard-orc commented 7 years ago

webpack.config.js: new HtmlWebpackPlugin({ // Also generate a test.html favicon:'src/assets/icons/page_bird1.ico', filename: 'linly.html', title: 'Trioly template', xfile:{ js: [publicPath+'assets/js/jquery.min.js'] }, template: 'src/pages/page1/page1.ejs', inject: 'body' })

page1.ejs: ...... <%- include hello.ejs %>

hello.ejs

hello world

then ,it report "unexpected string "

if i replace some configuration With ejs-render-loader or ejs-compile-loader template: '!!ejs-render-loader!src/pages/page1/page1.ejs',

then ,it report "htmlWebpackPlugin is undefined".....

how to fill these two requirements..?? ^_^

jantimon commented 7 years ago

The built in fallback loader does not support include but you can use another loader :)

lock[bot] commented 6 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.