ElMassimo / iles

🏝 The joyful site generator
https://iles.pages.dev
MIT License
1.07k stars 31 forks source link

Fresh iles project not working with vite@3.1.0 #192

Closed davidlueder closed 1 year ago

davidlueder commented 1 year ago

Description 📖

Vite v3.1.0 breaks the iles starter

Reproduction 🐞

npm create iles@next
cd iles-app
npm install
npm run dev

Workaround

npm create iles@next
cd iles-app
npm install -D --save-exact vite@3.0.9
npm install
npm run dev

Logs

Uncaught (in promise) Error: Page data not properly injected in app. Are you using it inside an island? at injectFromApp (pageData.js?v=de034eb9:12:15) at usePage (pageData.js?v=de034eb9:42:12) at Module.installDevtools (devtools.js:68:22) at @iles-entry:80:18

Screenshots 📷

Browser console: image

ElMassimo commented 1 year ago

Hi David, thanks for reporting!

Seems like in vite@3.1.0, the iles package is duplicated in development, causing a mismatch of Symbol keys for dependency injection:

Screen Shot 2022-09-06 at 09 08 55

Looks like iles build still works as expected, I'll investigate for a potential fix.

ElMassimo commented 1 year ago

Fixed in:

For now, create-iles will default to vite@3.0.9 until the next Vite release with the fix.