brillout / telefunc

Remote Functions. Instead of API.
https://telefunc.com
MIT License
690 stars 31 forks source link

`telefunc:packageJsonFile` conflicts with `vite-plugin-ssr:packageJsonFile` #33

Closed magne4000 closed 2 years ago

magne4000 commented 2 years ago

vps supports { "type": "module" } syntax, but telefunc does not yet. My issue is that telefunc generates package.json first, then vps, but vite warns me that it's already generated so it's skipped. Result: my package.json content is { "type": "commonjs" }, which is wrong.

Workaround

// Remove telefunc plugin for `package.json` file generation
const tel = telefunc().filter((p) => p.name !== 'telefunc:packageJsonFile');

Discussion

Easy fix would be to copy code from vps, but it's not really easy to maintain. Should we create a new repo under this organization to handle those common plugins?

brillout commented 2 years ago

I believe it's easily fixable (on Telefunc's side). I'll have a look at this tomorrow.

brillout commented 2 years ago

I agree about the duplicated code thing, I've a plan for this.