Run Fresh in subfolder with root deno.json
I'm using Fresh in a project where I have a big pile of other code in a separate folder. It works running the project if I have the
deno.json
file in the Fresh folder, but then formatting etc won't apply to code in the other folder.
Considering this, I am trying to get workspaces working, but I'm kind of stuck. If I make a root file and try to include Fresh as a workspace, the imports in it then fails due to not having been prefixed with ./
or ../
, if I move the imports to the root deno.json
I get an error that the Fresh deno.json
requires imports to be in there to run at all, but then those would override the ones in the root. I'm getting very confused by all of this.
Is it even possible to have a Fresh instance as a workspace folder? I'm basically looking to do the below, and I'm struggling to keep my sanity:
But yeah, I'm kind of at a moment 22 here and not sure how to get that to work. If possible I want to have separated imports between fresh
and other
, thus why it's split up like this, but again I'm struggling to actually get Fresh to work while in a workspace.4 Replies
The first error when putting Fresh in a workspace:
And the other error when I move the imports to the root config:
Posted an issue on the repo, because why not. I'm starting to think this is just not possible to do right now, so I should just give up and put everything in the Fresh folder and be done with it.
@marvinh. can you please take a look?
responded on GH
Ah, the difference to what I did was to move the whole Fresh config file to the root. I specifically wanted to split up the imports so started with a fresh config in the root and tried to move over as few parts as possible while retaining the config in the Fresh folder. I'm just home for a short while to look at this but will be back tonight. (Sweden)
I did what was mentioned in the guide and closed the issue, will mark this as solved too 😛 will give up on splitting things in workspaces and just run it all through one config, it will hopefully keep me sane 🤣