Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Fresh Integration: Allow jsonc type to Deno config file #67

Closed
btd1337 opened this issue Sep 23, 2023 · 1 comment
Closed

Comments

@btd1337
Copy link

btd1337 commented Sep 23, 2023

Problem
If you are importing a fresh project into Danet that has Deno config file in jsonc, then fresh integration won't work.

fresh_app
         |_ deno.jsonc
Captura de Tela 2023-09-23 às 13 01 18

Error

$ deno task launch-server

Task launch-server deno run --allow-net --allow-read --allow-run --allow-write --unstable --allow-env run.ts
The manifest has been generated for 7 routes and 0 islands.
error: Uncaught (in promise) TypeError: Module not found "file:///danet_app/src/fresh_app/deno.json".
    at file:///danet_app/src/fresh_app/fresh.gen.ts:5:20
		const manifest = (await import(url + './fresh.gen.ts')).default;
		                  ^
    at async Function.enableFreshOnRoot (https://deno.land/x/danet_fresh@0.0.1/mod.ts:43:21)
    at async bootstrap (file:///danet_app/src/bootstrap.ts:14:3)
    at async file:///danet_app/run.ts:3:21

Solution

Allow to pass Deno config file type in FreshModule.enableFreshOnRoot function.

Enum options: json (default), jsonc

enum DenoConfigFileType {
    JSON = 'json',
    JSONC = 'jsonc'
}
@Sorikairox
Copy link
Collaborator

Hey @btd1337, thanks a lot for all your issue/enhancement tickets for Fresh !

Sadly, I probably plan to drop supporting fresh for V2...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants