Skip to content
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

addTransform and addPlugin run order has changed in 1.0.0 ? #2044

Closed
Antonio-Laguna opened this issue Oct 22, 2021 · 2 comments
Closed

addTransform and addPlugin run order has changed in 1.0.0 ? #2044

Antonio-Laguna opened this issue Oct 22, 2021 · 2 comments

Comments

@Antonio-Laguna
Copy link

Describe the bug

I've realised that Eleventy 1.0.0 seems to have changed the order of execution between transforms and plugins. I eagerly tried to adopt 1.0.0 and saw that Eleventy Plugin Embed Twitter somehow break my site. Reported gfscott/eleventy-plugin-embed-twitter#33

Digging more into the issue it looks like on 0.12.1 the addTransform ran after plugins and now it runs before plugins. I'm not 100% sure if this is intended and couldn't find it documented but IMHO it's a bit of a controversial change given that the transform is used to minify the HTML and plugins occur after that, hindering the full effect of the transform.

For what is worth I have plugins enqueued first and the transform is enqueued last so I assume (maybe wrongly) that something has changed.

I'm happy to dig more into this but wanted to report this first to spark some discussion. Note that the issue I'm pointing is actually on the plugin side but has surfaced with this change which I find a bit controversial.

Environment:

  • OS and Version: macOS 11.6
  • Eleventy Version: 1.0.0-beta.2
@zachleat
Copy link
Member

Sorry I’m so late here but this is correct!

It is also on the official docs here: https://www.11ty.dev/docs/transforms/#order-of-execution

@zachleat
Copy link
Member

This is an automated message to let you know that a helpful response was posted to your issue and for the health of the repository issue tracker the issue will be closed. This is to help alleviate issues hanging open waiting for a response from the original poster.

If the response works to solve your problem—great! But if you’re still having problems, do not let the issue’s closing deter you if you have additional questions! Post another comment and we will reopen the issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants