Make more compatible for browser use. Pass TypeScript checks
See original GitHub issueWhen compiling code for updated versions of TypeScript, it now checks the require statements and several errors are being thrown:
ERROR in ../node_modules/jsonexport/dist/core/join-rows.js
Module not found: Error: Can't resolve 'os'
ERROR in ../node_modules/jsonexport/dist/parser/csv.js
Module not found: Error: Can't resolve 'os'
ERROR in ../node_modules/jsonexport/dist/core/stream.js
Module not found: Error: Can't resolve 'stream'
ERROR in ../node_modules/jsonexport/dist/parser/csv.js
Module not found: Error: Can't resolve 'stream'
It seems require(‘stream’) and require(‘os’) are not even really needed for the browser. The EOL can just be backslash “\n” in the browser. And stream is not needed if a callback is provided.
I manually edited the node_modules/jsonexport files and all came out well and built to browser. I will need to find the most compatible way to have all files live in harmony and that the dist folder has NO node based requires.
Will have to complete this with-in a weeks time at max. Please be available to publish to npm when I have completed
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
TypeScript: JavaScript With Syntax For Types.
TypeScript is JavaScript with syntax for types. TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at ......
Read more >TypeScript - Parcel
TypeScript is a typed superset of JavaScript that compiles to JavaScript. Parcel supports TypeScript out of the box without any additional configuration.
Read more >Introduction to cross-browser testing - Learn web development
Note: Make the web work for everyone discusses the different browsers, their market share, and related cross browser compatibility issues.
Read more >15 Typescript Mistakes To Avoid - SoftwareMill Tech Blog
Typescript took the Javascript world by storm. If you are a frontend developer working with the browser or a backend dev using Node...
Read more >Working with JavaScript in Visual Studio Code
Using the TypeScript language service, VS Code can provide smart completions ... you can make IntelliSense even more useful with JSDoc or by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@AckerApple I am honoured to have you helping maintaining this package! Really, thanks Acker!
I’m going to try and publish this code to npm. I feel real confident of it and in need of it for my team.