add inlineSources ts option
Hi!
The generated source map is referencing the Emoji.tsx file, which is not present in the published version of the package. This triggers an error when building a package depending on a11y-react-emoji:
./myPackage/node_modules/a11y-react-emoji/src/Emoji.js
Failed to parse source map from 'myPackage/node_modules/a11y-react-emoji/src/Emoji.tsx' file: Error: ENOENT: no such file or directory, open 'myPackage/node_modules/a11y-react-emoji/src/Emoji.tsx'
@ myPackage/node_modules/a11y-react-emoji/src/index.js 6:9-27 7:14-32
This can be fixed by adding the inlineSources option to tsconfig.json.
Link to the added option documentation: https://www.typescriptlang.org/tsconfig/#inlineSources
It's basicaly adding this line at the end of the Emoji.js file:
//# sourceMappingURL=Emoji.js.map
Hey @HarmonicTons! Thanks for contributing 😄
This sounds reasonable to me. I'll take another look locally, and if everything checks out then I will merge and prepare a new release soon.
🤔 It looks like that comment is already present in Emoji.js of the published package:
I am able to build a new React project with Vite that uses a11y-react-emoji without any errors. @HarmonicTons could you maybe open an issue with the steps to reproduce the error?
@HarmonicTons I'm going to close this PR for now. I'm happy to look at things again if we can get the issue reproducing reliably.