11ty / eleventy-plugin-vite

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

Dynamically import Vite #40

Closed benmccann closed 1 year ago

benmccann commented 1 year 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 1 year 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 1 year 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 1 year 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 1 year 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 1 year ago

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

benmccann commented 1 year ago

Correct. Thanks for the merge!

groenroos commented 11 months ago

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

groenroos commented 10 months ago

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