11ty / eleventy-plugin-vite

A plugin to use Vite with Eleventy
134 stars 10 forks source link

Dynamically import Vite #40

Closed benmccann closed 8 months ago

benmccann commented 11 months ago

Vite will soon be dropping CJS support which means that you won't be able to require it. You either need to convert your code to ESM or dynamically import it. I've done the latter here for simplicity, but longer-term you'll probably want to convert to ESM rather than continuing to use the legacy CJS syntax

benmccann commented 11 months ago

@zachleat any chance I could get a review on this? Eleventy is one of just a few frameworks we have left to migrate before Vite 5. Thanks!

benmccann commented 11 months ago

@zachleat a quick reminder about this PR. I'd like to give users time to migrate before they are broken by a new release of Vite

benmccann commented 9 months ago

Vite 5.0.0-beta.7 is now out. You are running out of time to merge this PR before it starts affecting users

groenroos commented 8 months ago

Vite 5 was released 2 weeks ago, and would very much like to upgrade. What would need to happen for eleventy-plugin-vite to be able to adopt the new version? πŸ™

zachleat commented 8 months ago

Doesn’t look like is a breaking change, right? We can semver as a minor?

benmccann commented 8 months ago

Correct. Thanks for the merge!

groenroos commented 7 months ago

Thanks for merging! πŸ‘Š Any chance of cutting a new minor release to get it out there? πŸ™

groenroos commented 6 months ago

@zachleat Hi! Is there anything else that needs to happen before this can be released on npm? πŸ™