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

Asset bundling outside webc, and non layout files #46

Closed
cfjedimaster opened this issue Jan 20, 2023 · 2 comments
Closed

Asset bundling outside webc, and non layout files #46

cfjedimaster opened this issue Jan 20, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@cfjedimaster
Copy link

I was testing asset bundling with a Liquid file and noticed this didn't work:

<script>{{ page.url | webcGetJs }}</script>

No error was thrown, it just returned an empty script tag. On a whim, I moved my HTML layout from my test file to a layout, and it worked there. Now, the docs do say:

Outside of *.webc files (e.g. in Nunjucks or Liquid layout files)

and "layout" is specified there, I don't see why it couldn't work in a regular Liquid page using the same code.

If this can't be done, can we bold the layout part perhaps, or make it more clear?

@cfjedimaster
Copy link
Author

I'll add, the fact that in a non-layout webc file it works, really implies it should work in a non-layout liquid/etc file as well.

@zachleat zachleat added the enhancement New feature or request label Feb 2, 2023
@zachleat
Copy link
Member

zachleat commented Feb 2, 2023

This is solved with https://github.com/11ty/eleventy-plugin-bundle and will be used internally in the eleventy-webc-plugin@0.9.0 (please subscribe to #48!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants