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
PARSE_ERROR: keep Acorn’s original message somewhere #3149
Comments
I see no reason why we should not address this, the improvement would be easy and unlikely to break anything. Maybe as a small change, as I am not 100% sold on the name |
I would love to help with this one 🙌 |
Nice! As no one else volunteered yet, the issue can be yours. As you probably saw in the description, I added some notes as to what I think needs to be done, just tell me if you need more info. If you are unsure, you can also just start a PR and we can talk about it there. New contributors are always very much welcome! |
BTW I actually think you do not need to add a new test, it is probably enough to fix the tests that check for a |
Resolved via #3176 |
Expected Behavior / Situation
Actual Behavior / Situation
Modification Proposal
Context:
src/Module.ts
.parserMessage
.module.id.endsWith('.js')
may need to be changed to also accommodate.mjs
.Note by maintainers (by @lukastaegert)
🙋♀️ Want to get involved and address this? This issue is likely easy to address and a good starting point to get familiar with the Rollup code base.
The proposed solution is here
rollup/src/Module.ts
Line 133 in 53266e6
parserError
property to the object passed tomodule.error
. For that, theRollupError
type will need to be extended with an additional optional property.To test this, a test in the
function
folder makes sense as those tests are capable of checking error messages, cf. e.g. this test:rollup/test/function/samples/double-named-export/_config.js
Lines 4 to 21 in 53266e6
The text was updated successfully, but these errors were encountered: