You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"name": "parcel_jsdoc_test","version": "1.0.0","description": "","source": "test.js","main": "dist/test.js","scripts": {"test": "echo \"Error: no test specified\" && exit 1"},"author": "","license": "ISC","devDependencies": {"@parcel/reporter-sourcemap-visualiser": "^2.8.2","parcel": "^2.8.2"}}
🤔 Expected Behavior
When I add JSDoc inline tags, I expect the line numbers in the browser console to remain consistent with the line numbers in the original file.
😯 Current Behavior
When I build the sample code below and run it in Chrome, it logs CHECK1 and CHECK3 at the correct line number, but logs CHECK2 at line 8 when it should be line 7. If I run the same code in Firefox or delete the source map file and run in Chrome, the issue goes away.
I'm guessing that JSDoc syntax is interfering with the way Parcel generates source maps.
💁 Possible Solution
???
🔦 Context
I'm working on documenting a library with JSDoc, and console logs and error messages are now way out of sync with the source.
💻 Code Sample
console.log("CHECK1");
/**
* Description
* @class Test
*/
class Test {}
console.log("CHECK2");
console.log("CHECK3");
🌍 Your Environment
Software
Version(s)
Parcel
2.8.2
Node
14.18.1
npm/Yarn
npm 6.14.15
Operating System
Windows 10
The text was updated successfully, but these errors were encountered:
Try saving the file with Unix line endings instead of Windows line endings as a workaround (and to verify that this is indeed the issue)
Related in that case: #8302, #8691, swc-project/swc#6694
🐛 bug report
🎛 Configuration (.babelrc, package.json, cli command)
package.json
🤔 Expected Behavior
When I add JSDoc inline tags, I expect the line numbers in the browser console to remain consistent with the line numbers in the original file.
😯 Current Behavior
When I build the sample code below and run it in Chrome, it logs CHECK1 and CHECK3 at the correct line number, but logs CHECK2 at line 8 when it should be line 7. If I run the same code in Firefox or delete the source map file and run in Chrome, the issue goes away.
I'm guessing that JSDoc syntax is interfering with the way Parcel generates source maps.
💁 Possible Solution
???
🔦 Context
I'm working on documenting a library with JSDoc, and console logs and error messages are now way out of sync with the source.
💻 Code Sample
🌍 Your Environment
The text was updated successfully, but these errors were encountered: