What do you mean? How would you solve this in a rollup build for example if you want to apply the variables after the build has completed? Happy to hear about any possible improvements :)
Well, ejs takes a template (string, from whatever source, ie. from a file) and data in form of the object (which you take from whatever source) and outputs a string (which you handle however you want), that you can save to a file.
You can either write very simple rollup plugin, or use existing one (i assume there is already one), or run it as node myscript.js - "Its just javascript", as they say :)
Oh now I understand, thank you for the explanation. That's an option but then your compiler should accept it respectively it's probably only possible if you can hook on a pre-build lifecycle or something, but yes, that's a good idea! Thx for the feedback.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What do you mean? How would you solve this in a rollup build for example if you want to apply the variables after the build has completed? Happy to hear about any possible improvements :)
Well, ejs takes a template (string, from whatever source, ie. from a file) and data in form of the object (which you take from whatever source) and outputs a string (which you handle however you want), that you can save to a file.
You can either write very simple rollup plugin, or use existing one (i assume there is already one), or run it as
node myscript.js
- "Its just javascript", as they say :)Oh now I understand, thank you for the explanation. That's an option but then your compiler should accept it respectively it's probably only possible if you can hook on a pre-build lifecycle or something, but yes, that's a good idea! Thx for the feedback.