-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Deprecation warning and incorrectly rendered templates when using marko 5 #218
Comments
I'm not sure how to fix this.. Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is there any update on this? |
Okay, I did some digging. But I don't know point-of-view good enough to make a recommendation where to apply a change. First, where is the deprecation message thrown? Introduced with marko-js/marko@f7cbb1b#diff-b519b63eac473d4387093cd806b235ee2e9ae661a471fa623fd62efa982e6742 I would assume, around the same time, the documentation got updated to recommend the API: https://markojs.com/docs/installing/ Given that point-of-view is a fastify-plugin, Now to the guessing part. My assumption is, that Marko would get invoked in Line 363 in f218d2e
which in turn would call https://github.com/marko-js/marko/blob/94992f26dbf0dd4d5378ec9f1b52b8fb81a8597d/packages/marko/src/loader/index.js#L10 which in turn invokes https://github.com/marko-js/marko/blob/94992f26dbf0dd4d5378ec9f1b52b8fb81a8597d/packages/marko/src/loader/index.js#L78 which then triggers the deprecation notice. Can you assist, @DylanPiercey? |
@Ryuno-Ki I've got a few things I'm trying to wrap up this week. I'll take a closer look at this closer to the end of the week. Thanks for notifying me 😄 |
How to modify the code to solve the issue? WARNING!! /routes/index.js
|
Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
I'm currently thinking it may make sense to remove Marko from It can still be achieved by using the require hook, but this module adding a require hook seems awkward IMO and again would not be optimal. We have an official Marko fastify adapter (https://github.com/marko-js/fastify) which is designed for use with precompiled templates, typically through a bundler, and I think it is a better fit. (If you want to test it you can Unless anyone has a good idea on how we could precompile templates while still supporting this |
I'm on board of removing Marko. |
Support dropped here. Please refer to https://github.com/marko-js/fastify for the alternative. |
…or API changes in v8, removed support for razor-tmpl removed marko support (per <fastify/point-of-view#218>), fixed try/catch issues (per <tj#341>)
🐛 Bug Report
If upgrading to Marko v5, the incorrect compiler is used. Throwing a deprecation notice.
To Reproduce
Use the latest version of marko with the latest versions of point-of-view and fastify.
The following deprecation notice is shown in the console:
Templates are not rendered correctly.
Expected behavior
Templates are rendered correctly and no deprecation notice is shown in the console.
Your Environment
The text was updated successfully, but these errors were encountered: