Webpack Loader #230
Replies: 4 comments
-
I have implemented my own naive Rollup plugin (https://github.com/foisonocean/cf-download-proxy/tree/4131d12bd7a6df03a02e3ab71607674889fc28d0/build/rollup-plugins/eta), to compile templates to JavaScript source code at build time, since some JavaScript engine (like Cloudflare Workers) don't allow |
Beta Was this translation helpful? Give feedback.
-
@foisonocean
The v2 restructure, #70 will allow you to explicitly use the code for different environments, meaning you could do const { compile } = require("eta/dist/browser/eta.umd.min");
compile("<%~ includeFile('./a') %>")() // throws error with fs not being supported Would that work for your rollup plugin? You could try using the v1 browser UMD build, it may not work the best way. |
Beta Was this translation helpful? Give feedback.
-
Any update on this? would love to have an eta-loader for Webpack |
Beta Was this translation helpful? Give feedback.
-
We made a plugin with |
Beta Was this translation helpful? Give feedback.
-
It would be great to have a Webpack loader for
.eta
templates. It should have.eta
files export the compiled function. Once the initial version with that is completed, we can add support for plugins and configuration for the loader.Beta Was this translation helpful? Give feedback.
All reactions