How to have component level data in EJS using Webpack -
i using ejs using htmlwebpackplugin webpack. @ moment have json file per each page , working ok. doing website different theme , love send data per component instead of per page. seems not possible through htmlwebpackplugin. in page have
<%- include ../../components/header/header.ejs %>
which works fine.
however, have like
<%- include('../../components/header/header.ejs', {site: 'secondwebsite'}); %>
which getting error:
error in ./~/html-webpack-plugin/lib/loader.js!./src/templates/pages/avalon/index.ejs module build failed: error: enoent: no such file or directory, open 'c:\projects\ui\src\templates\layouts\secondwebsite\('..\components\header\header.ejs', {site: 'secondwebsite'});'
i wondering if has solution this?
Comments
Post a Comment