-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be more useful to import the compiled template than the generated text #1
Comments
I very much agree with your suggestion. I'm trying to use parcel from webpack.Now, i get a trouble about parcel-plugin-ejs: names is not defined.
How to solve this problem now... |
@thoughtbyte any thoughts about this? Take in mind that this is how webpack's ejs-loader works, and it seems to be a much better use for this plugin. |
yep, thanks for the suggestion. i will be updating this. the reason i published this first is to sue as a base for a custom ejs plugin that will read variables directly from the template file, in the form of front-matter, but i will make this change here! thanks! |
fixed in 0.2.0 |
How about work as pug in parcel? |
ejs templates are meant to be used with different render data, and when importing them, there is no way to pass render data.
I think it will be more useful to import the compiled template instead.
How it works currently
results in error: buttonText is not defined
The Suggestion
With the same ejs file,
This change would be a matter of changing this line from
return compiled();
toreturn compiled;
.The text was updated successfully, but these errors were encountered: