Angular -> No template for dependency: ConstDependency

Here is my code:

const worker = new Worker('./app.worker.ts', { type: 'module' });
console.log('this is the worker');
worker.onmessage = ({ data }) => {
  console.log(`page got message: ${data}`);

It is having trouble on that first line. If I remove the {type: 'module'} it does not give me the error (but it also does not work). I have tried npm prune and npm dedupe but that did not fix it.

Read more here:

Content Attribution

This content was originally published by Ish Montalvo at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: