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

Running browser watch command not fully working because of custom tsconfig paths #18

Open
zoton2 opened this issue Dec 4, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@zoton2
Copy link
Owner

zoton2 commented Dec 4, 2022

For some reason I guess I never noticed this when making the template before (it doesn't happen in build mode), but when you run the watch command for the browser, you get "The following dependencies are imported but could not be resolved" and it lists some "dependencies" which are just pointing to local files but using a custom path set in tsconfig.browser.json. This is actually an issue, as the browser pages don't actually load after this. My best guess to why this doesn't effect building is because the current paths being used in code only point to type files.

I tried putting in the vite-tsconfig-paths plugin but no luck, even though it can find the tsconfig.browser.json file just fine.

I also found a person mentioning it may be a rollup issue, but the way to fix it may have to be done in vite-plugin-nodecg. That fix can be found here.

@zoton2 zoton2 added the bug Something isn't working label Dec 4, 2022
@zoton2 zoton2 self-assigned this Dec 4, 2022
@zoton2
Copy link
Owner Author

zoton2 commented Mar 3, 2023

It was suggested in the NodeCG Discord to just use the resolve.alias configuration in the vite.cconfig.mjs file and from what I can see, that seems to work. I thought I would've tried that before but I guess not? Shall do some more checks and close this if that does fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant