ElMassimo / iles

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

Custom outDir and hydration breaks build #130

Closed gilesbutler closed 2 years ago

gilesbutler commented 2 years ago

Description 📖

When using custom outDir and hydrated components i.e <Welcome client:load /> the build fails with the following error:

✖ writing pages
build error:
 [ENOENT: no such file or directory, open '/home/projects/iles-slj6as/temp/build/manifest.json'] {
  code: 'ENOENT',
  errno: -2,
  path: '/home/projects/iles-slj6as/temp/build/manifest.json',
  syscall: 'open'
}

Reproduction 🐞

https://stackblitz.com/edit/iles-slj6as?file=src%2Fpages%2Fabout.vue,src%2Fcomponents%2FWelcome.vue,iles.config.ts

Dependencies Info _Run `npx iles info` and `pnpm list` (or `npm list`) and provide the output:_ ``` iles v0.7.38 vite v2.9.9 ```

Screenshots 📷

CleanShot 2022-06-09 at 09 35 18@2x

gilesbutler commented 2 years ago

Hey @ElMassimo would love to get your thoughts or inout on this. Happy to do a PR if you can help point me in the right direction 😃

ElMassimo commented 2 years ago

Hi Giles! @gilesbutler

Seems like the outDir option is not being used when building islands. If you run build in your reproduction, you can see that it's still writing in dist instead of temp/build.

Setting outDir explicitly when building islands should fix the problem.

Pull requests are welcome!

gilesbutler commented 2 years ago

Awesome, thanks @ElMassimo I'll take a look 👍

ElMassimo commented 2 years ago

Closed by #134, released in iles@0.7.39. Thanks!