Skip to content

Issue with isolatedModules turn on in project #37

@iroy2000

Description

@iroy2000

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions