Source map support
Closed this issue · 1 comments
connorjclark commented
A project that utilizes this package and has source maps, emits this sort of trace when there is an error thrown from this package:
TypeError: Argument not optional
1
File "webpack:///./node_modules/share-this/dist/share-this.js" line 1 col 1655 in a
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"...
2
File "webpack:///./node_modules/share-this/dist/share-this.js" line 1 col 3262 in f
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"...
3
File "webpack:///./node_modules/share-this/dist/share-this.js" line 1 col 3162 in Anonymous function
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"...
I'm not 100% sure how to resolve this, it's either going to be one of two ways:
- Emit a source map
.js.map
alongside each file indist/
. I'm unsure if typical tooling can utilize source maps like this, but maybe! - Maintain a ES2015 module entry point - so instead of importing
share-this
, the user can importshare-this/es2015
and whatever compilation process a user uses can create the mappings.
MaxArt2501 commented
I need to review the whole code generation process, actually.
It will be hopefully solved by then.