Replies: 1 comment 1 reply
-
Since Remix 2.2.0 and Vite support you can use Setup from Astro doc
vite.config.ts: Add yaml plugin
env.d.ts add:
Anywhere in your app:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to be able to import YAML files inside my components as JS objects because I have statecharts described mostly in YAML and implemented in JS or TS. I can very well convert them into JSON and use them, but YAML is better for big structures because it is easier to change and I can comment in it as much as I want (JSON doesn't support comments and JS objects will be relatively poor readability + speed of development compared to what YAML gives me with statecharts). Either way, a person can have several reasons to import YAML files.
In NextJS I would simply add a
yaml-loader
in the config and it would just work. YAML is just like JSON and I'm not asking for it to be supported natively, but maybe a way to add custom-loaders would be the way to go. Currently, this is the only thing that's stopping me from porting all of my old applications to Remix. There are a few more things that I am yet to figure out while combining statecharts with Remix, but I'll ask about them later.I dug around and found out that this feature is not supported yet (from somebody's query in discord around 8 months ago) so I'm opening up an issue/discussion about it.
Beta Was this translation helpful? Give feedback.
All reactions