Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Show error output for rescript config errors #109

Open
Coteh opened this issue Sep 3, 2020 · 3 comments · May be fixed by #115
Open

Show error output for rescript config errors #109

Coteh opened this issue Sep 3, 2020 · 3 comments · May be fixed by #115

Comments

@Coteh
Copy link

Coteh commented Sep 3, 2020

Hi, another quick question and feel free to close if there's something I missed when reading the documentation.

I created a .rescriptsrc.js file as a custom rescript that modifies webpack config and put this file in my project root. I noticed that when I run into any JS error, it does not display it at all, instead it shows:

You're likely seeing this bug because you haven't defined a root rescript or your root rescript contains a syntactical error. If you're certain of otherwise, please file an issue.

I took a quick skim of loader.js and I was just wondering how difficult/feasible it would be to emit errors here, or if there's another way to do it that I don't of yet. If there's something that can be implemented, I'd be interested to help as well. Thanks for reading.

@harrysolovay
Copy link
Owner

Good question! It's feasible (emitting the parse error). Would love a PR! :)

@Coteh
Copy link
Author

Coteh commented Nov 9, 2020

Hi @harrysolovay I have started working on this, and I have a question. If .rescriptsrc is provided, it attempts to parse JSON first then attempts to load it as a node module. In the case that there's both a JSON error and a JS error in the file, which should be prioritized? Currently it will emit both types of errors.

Also, can you assign me to this issue since I started working on it. Thanks.

@Coteh Coteh linked a pull request Nov 9, 2020 that will close this issue
@trickpattyFH20
Copy link

Will this be merged/released soon? @harrysolovay

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

Successfully merging a pull request may close this issue.

3 participants