Replies: 1 comment
-
|
You might have better luck filing an issue on the Vite plugin repo directly! https://github.com/11ty/eleventy-plugin-vite |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
i am experimenting with https://www.11ty.dev/docs/server-vite/ and looking for the correct setup to delegate to vite all script bundling, maybe css bundling too, at the same time it correctly emits the entry point setup in my 11ty polyglot templates.
i want to keep layouts where vite bundles get properly injected while i benefit of all the good stuff that eleventy delivers.
this is my current package.json:
{ "type": "module", "scripts": { "dev": "eleventy --serve --incremental", "build": "eleventy" }, "devDependencies": { "@11ty/eleventy": "^3.1.5", "@11ty/eleventy-plugin-vite": "^8.0.0-alpha.2" } }my .eleventy.js follows:
The issue i am facing is, whenever i change a javascript file which vite is supposed to bundle, nothing happens.
And also, if i don't set explicitly the output name, i am unable to inject the emited file name in my eleventy layouts.
So, two key questions:
1- how do i make my layouts aware of emitted bundles?
2- How to trigger hot reload for scripts or css or something, not only for my templates?
Any guidance is welcome!
Beta Was this translation helpful? Give feedback.
All reactions