Comments (6)
I dont think so. Looking at the unit test, eta is wrong initialized.
It should be done like this according the unit tests:
const { Eta } = require('eta')
const path = require("path");
const app = require("fastify")();
app.register(require("@fastify/view"), {
engine: {
eta: new Eta(),
},
root: path.join(__dirname, "view"),
});
app.get("/", function (req, rep) {
rep.view("index.eta");
});
app.listen({
port: 3000,
host: "127.0.0.1",
});
from point-of-view.
Yeah, this was not the case in v1/2 if I'm not mistaken
After v3, it ought to be initialized like how @Uzlopak did
It works on my end, feel free to comment if the issue persists
from point-of-view.
I have the same issue here. I looked up and engine.configure actually exists in the code itself.
Lines 672 to 675 in db34d0e
Prerequisites
* [x] I have written a descriptive issue title
* [x] I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.22.2
Plugin version
8.0.0
Node.js version
20.6.1
Operating system
Ubuntu Server LTS
Operating system version (i.e. 20.04, 11.3, 10)
22.04.3 LTS
from point-of-view.
Yeah but if eta does not have .configure than...
from point-of-view.
Yeah but if eta does not have .configure than...
So eta broke the compatibility?
from point-of-view.
Now I see it too lol
point-of-view/test/test-eta.js
Lines 17 to 33 in db34d0e
from point-of-view.
Related Issues (20)
- Deoptimized access to `reply.locals` HOT 4
- Type of templates property in PointOfViewOptions show allow arrays HOT 1
- Allow custom `Content-Type` header for Nunjucks HOT 1
- How to render view dynamically by http status on ExceptionFilter HOT 1
- Nunjucks templates do not dynamically reload in development HOT 4
- could you add support of svelte? HOT 1
- support for async minify methods HOT 3
- eta v3 integration doesn't work HOT 1
- nunjucks custom filter is not working HOT 1
- I am getting the following error after installing and configuring the lib: reply.view is not a function HOT 2
- Support for view raw text
- `fastify.view` is rendered without `reply.locals` HOT 18
- Swig support HOT 3
- Like operator not works on return reply.view HOT 7
- Postgresql's like operator not works on return reply.view HOT 1
- Fastify app not updating pages unless another route is added HOT 1
- When `onError` hook is defined, failure to compile template crashes server (ejs) HOT 4
- Proposal: Remove `send` calls HOT 4
- Support absolute paths for `layout` and `partials` properties for Handlebars HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from point-of-view.