electron-web-worker-example | bare minimal example of a Web Worker | Runtime Evironment library
kandi X-RAY | electron-web-worker-example Summary
kandi X-RAY | electron-web-worker-example Summary
Bare minimal example that shows a Web Worker running in Electron with Node integration, meaning the Worker can use Node.js APIs (f.e. require() to import NPM dependencies, etc).
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 electron-web-worker-example
electron-web-worker-example Key Features
electron-web-worker-example Examples and Code Snippets
Community Discussions
Trending Discussions on electron-web-worker-example
QUESTION
I try to import a node module inside an Angular 8 web worker, but get an compile error 'Cannot find module'. Anyone know how to solve this?
I created a new worker inside my electron project with ng generate web-worker app
, like described in the above mentioned ng documentation.
All works fine until i add some import like path
or fs-extra
e.g.:
ANSWER
Answered 2019-Sep-06 at 22:43As you've noticed the first error is a TypeScript error. Looking at the tsconfig.worker.json
I've found that it sets types
to an empty array:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install electron-web-worker-example
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