-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
getBundle in serverless only running on first invocation #23
Comments
FYI: this is no longer urgent for me, but might still be something that's worth fixing. I just externalized the scripts and styles from my .webc components into separate .js and .css files so I do not have to rely on getBundle. |
I'm also facing the same issue. Could you expand on how you externalized the scripts and styles? |
I just copied all the CSS and JS from my WebC components into a styles.css and scripts.js file and deleted the To copy the CSS and JS files to my output folder I use Passtrough File Copy. Finally, I link the files as regular stylesheets/scripts like this: <link rel="stylesheet" href="/styles.css" webc:keep>
...
<script src="/scripts.js" webc:keep></script> The Does that help you @derron1 |
Confirming I bumped into this one as well!
Change
To
Edit: Didn't refresh enough! Using a eleventy-plugin-bundle/codeManager.js Lines 157 to 160 in 10f19ef
I don't know how |
Operating system
macOS Sonoma 14.2.1 (23C71)
Eleventy
2.0.2-alpha.2
Describe the bug
I'm using Eleventy Serverless in dynamic template rendering mode to render previews of the site before they get published in the CMS.
The preview works fine so far. However, only on the first render. As soon as I reload the page or want to preview another document, the CSS and JS that gets generated using
getBundle('css')
andgetBundle('js')
are empty.I'm generating the styles and scripts as follows:
Reproduction steps
Expected behavior
getBundle should run on every invocation of serverless function.
Reproduction URL
https://github.com/timonforrer/11ty-get-bundle-test
Screenshots
No response
The text was updated successfully, but these errors were encountered: