Issue with isolatedModules turn on in project
iroy2000 opened this issue · 0 comments
iroy2000 commented
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 ?