Open riderx opened 3 weeks ago
currently you need plugin to support yml in farm, you can search vite plugin yaml and add it to vitePlugins of farm.config.ts
@wre232114 can you suggest any plugin ?
https://github.com/Modyfi/vite-plugin-yaml should work, Are you configured the plugin in vitePlugins
of farm.config.ts
. It may not work if you configure vite plugins in plugins
of farm.config.ts
And we tested that this i18n plugin works for yaml too. https://github.com/farm-fe/farm-vue-pure-admin/blob/main/build/plugins.ts#L26
You can see my last attempt here: https://github.com/Cap-go/capgo/blob/farm/farm.config.mts Maybe there is something I'm missing.
I'll try this repo
farm.config.mts
is not supported for now. You should use farm.config.ts
instead
@riderx https://farm-fe.github.io/docs/plugins/official-plugins/yaml try it
There are still other issues. @shulandmimi is working on the vite plugin compatibility
Steps to reproduce
Clone https://github.com/Cap-go/capgo/tree/farm run![CleanShot 2024-06-24 at 04 30 30@2x](https://github.com/farm-fe/farm/assets/4084527/6e1345f2-ca5d-4835-8e98-3876502b9f7f)
bun i
thennpm run serve
And you should get the error:Reproduce link
https://github.com/Cap-go/capgo/tree/farm
What is actually happening?
It seems the YML cannot be parsed. i don't see any need of plugin in vite, so i think something is missing in farm. Maybe my config is off, but it mostly follow the one from Vitesse: https://github.com/antfu-collective/vitesse
System Info