ngx-filesaver | Simple file save with FileSaver.js | Command Line Interface library
kandi X-RAY | ngx-filesaver Summary
kandi X-RAY | ngx-filesaver Summary
Simple file save with FileSaver.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ngx-filesaver
ngx-filesaver Key Features
ngx-filesaver Examples and Code Snippets
Community Discussions
Trending Discussions on ngx-filesaver
QUESTION
I want to use a library in Angular. (The npm package is cubing for reference). This library can run both in the browser or in node and has some specific code to both. I want it to run in the browser, but Angular compilation doesn't work because it can't find worker_threads
. I asked the library owner and he said the intended solution is to tell your build system that this import should be ignored because it's only relevant for the node variant of the code.
But I can't figure out how to tell Angular this. How do I tell it: Please ignore this import in this node module, we're never going to reach the code that uses it?
Error: Can't resolve 'worker_threads' in REDACTED/node_modules/cubing/dist/esm
If that's not possible, I guess I could consider doing a node_modules patch, but I dislike that idea, for obvious reasons. And I heard it's hard to get it to work in production environments.
For reference, this is the github project (switch to branch scrambles for the problem at hand): https://github.com/Lykos/cube_trainer.git
And here the most relevant files:
Package.json:
...ANSWER
Answered 2022-Jan-04 at 19:22Looks like you might be able to exclude it in the tsconfig or in the angular.json, maybe try both?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ngx-filesaver
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page