You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
... compiles a template during a Webpack build, so "this loader does not compile anything at compile time" seems factually incorrect to me. However, yes, it does produce code dependent on _.escape, and it's unfortunate that I have to use ProvidePlugin to supply the _.
A better approach, IMO, would be to have a loader option taking the name of the module to use ("lodash" or "underscore"), and supplying it to the template compiler via the imports option, preferably defaulting to "lodash". Inlining _.escape would be even better, but that isn't trivial to achieve correctly.
Why do I open an issue here, instead of just using ejs-compiled-loader? Well, I'm using it, for now, but I'd prefer to use this loader, since it has fewer dependencies and uses Lodash.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Continuation of #28.
@KnisterPeter This line ...
https://github.com/okonet/ejs-loader/blob/4dbd9db88197c3c9d6bd60bb4f3ddea528767cfa/index.js#L23
... compiles a template during a Webpack build, so "this loader does not compile anything at compile time" seems factually incorrect to me. However, yes, it does produce code dependent on
_.escape
, and it's unfortunate that I have to useProvidePlugin
to supply the_
.A better approach, IMO, would be to have a loader option taking the name of the module to use ("lodash" or "underscore"), and supplying it to the template compiler via the
imports
option, preferably defaulting to "lodash". Inlining_.escape
would be even better, but that isn't trivial to achieve correctly.Why do I open an issue here, instead of just using
ejs-compiled-loader
? Well, I'm using it, for now, but I'd prefer to use this loader, since it has fewer dependencies and uses Lodash.The text was updated successfully, but these errors were encountered: