Open neginbasiri opened 6 years ago
I had same issue, because it install 1.x without version. you can reinstall it by yarn add ejs-compiled-loader@2.x
or npm install ejs-compiled-loader@2.x
. May be you need remove old first.
When you include child template with data by webpack, you may still have trouble. I got error that can't find include function. You can try <%- require('content.ejs')({ content: content })%>
@relaxgo Thanks for response. I can use local data now! You saved a lot of my time. The only issue I have now is webpack doesn't rebuild on ejs file changes. Any solution for that?
@relaxgo having the same issue for several days. Thanks for your solution, it works great!
Hi all I try to pass local data using include but getting error.
I confirm that this works
<%-
include ../../components/content.blocks/two.column.content.ejs %>However when I pass some local data along with include as bellow I get error
<%-
include('../../components/content.blocks/two.column.content.ejs', {content: content}); %>However I got error ENOENT: no such file or directory, open 'C:\Projects\Nephele\src\UI\src\templates\layouts\avalon('..\components\content.blocks\two.column.content.ejs', {content: content});'
More Detail Code:
page.templates.js
webpack.config.js
fleets.ejs
Fleet.layout.ejs