Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with isolatedModules turn on in project #37

Open
iroy2000 opened this issue Feb 12, 2021 · 0 comments
Open

Issue with isolatedModules turn on in project #37

iroy2000 opened this issue Feb 12, 2021 · 0 comments

Comments

@iroy2000
Copy link

iroy2000 commented Feb 12, 2021

I'm using webpack 4.28.4 and typescript 3.5.1.

I tried to install the comlink-loader, everything seems fine, but it complain my worker is not a module.

All files must be modules when the '--isolatedModules' flag is provided.
// something.worker.ts

import { doSomething } from './util';

export const processSomething = async(payload) => {
  return doSomething(payload);
}

This is my webpack config for comlink-loader, it is basically copy and paste.

  {
    test: /\.worker\.ts$/i,
    use: [{
      loader: 'comlink-loader',
      options: {
        singleton: true
      }
    }]
  },

Do you see if I'm missing anything here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant