ElMassimo / iles

🏝 The joyful site generator

Home Page:https://iles.pages.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iles using a named export from vue/transformer-sfc that does not exist

jmegs opened this issue · comments

Description 📖

iles using a named export from vue/transformer-sfc that does not exist

Dependencies Info
iles v0.9.5 | vite v4.5.1

- iles@0.9.5
- typescript@5.3.3
- vue-tsc@1.8.27

Logs 📜

If not providing a reproduction:

Output
$ DEBUG=iles:* npm run dev

> iles-app@0.0.0 dev
> iles dev --open

file:///Users/jmeguerian/Code/tmp/iles-app/node_modules/iles/dist/node/chunk-IMB7AIW2.js:63
import { shouldTransformRef, transformRef } from "vue/compiler-sfc";
                             ^^^^^^^^^^^^
SyntaxError: The requested module 'vue/compiler-sfc' does not provide an export named 'transformRef'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async executeCommand (file:///Users/jmeguerian/Code/tmp/iles-app/node_modules/iles/dist/node/cli.js:25:30)

Node.js v21.1.0

I'm seeing the same thing.

It looks like transformRef was removed in vue 3.4. See line 15 here

My nasty hack of a workaround is to fiddle my package-lock to force vue 3.3.

It seems from this commit (lines 73-78) that shouldTransformRef is hardcoded to return false, suggesting that this functionality is no longer needed and we can remove all references to transformRef in iles?

Thanks for reporting, I'll remove usage of transformRef in the next release.


The reactivityTransform proposal has been removed in Vue 3.4, but it's usable through a third-party plugin.

I think the reactivity transform remains a nicer dialect when using script setup, especially once Vue introduced the ability for watch to receive a getter, which addressed some of the DX concerns such as having to use $$().

However, it's better to let the user make that decision on their own (custom Vite plugins can be added easily in iles.config.ts).

Do you have an ETA? Right now a fresh iles instance is broken right after install. I tried to massage my package lock into working but was less successful than @ohuu

This also fixes #242

Hey @ElMassimo I'd really like to contribute to Iles, maybe this would be a good issue to tackle but I'd need some onboarding to the project. Is there any docs which would help me to setup a dev environment so I can start working on it?

Hi Oliver! That would be great! 😃

I haven't written an onboarding guide to the project itself, but typically all you need is a modern Node version (20, for example), and pnpm to install dependencies for the entire project.

Building packages can be done by running pnpm run build inside each package, or pnpm run dev to keep a daemon running to rebuild the package as you change the source code.