# Aurelia Webpack with Typescript Module: Module not found

**URL:** <https://discourse.aurelia.io/t/aurelia-webpack-with-typescript-module-module-not-found/4249>\
**Category:** Help Requests\
**Created:** [June 10, 2021, 7:20am UTC](https://discourse.aurelia.io/t/aurelia-webpack-with-typescript-module-module-not-found/4249 "2021-06-10T07:20:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mreiche](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/mreiche/32/1912_2.png) [@mreiche](https://discourse.aurelia.io/u/mreiche)\
**Post date:** [June 10, 2021, 7:20am UTC](https://discourse.aurelia.io/t/aurelia-webpack-with-typescript-module-module-not-found/4249/1 "2021-06-10T07:20:59Z")

</div>

Hi. I followed the instruction for the Typescript WebWorker integration for Webpack here: [GitHub - webpack-contrib/worker-loader: A webpack loader that registers a script as a Web Worker](https://github.com/webpack-contrib/worker-loader#integrating-with-typescript)

Even when my IDE is able to resolve it, my Aurelia application is not able to load the module.

Module `worker-loader.d.ts`

```auto
declare module "worker-loader!*" {
    // You need to change `Worker`, if you specified a different value for the `workerType` option
    class WebpackWorker extends Worker {
        constructor();
    }

    // Uncomment this if you set the `esModule` option to `false`
    // export = WebpackWorker;
    export default WebpackWorker;
}

```

My `main.ts`

```auto
import Worker from "worker-loader!./worker";

export function configure(aurelia: Aurelia) {
    const worker = new Worker();

    worker.postMessage({ a: 1 });
    worker.onmessage = (event) => {};

    worker.addEventListener("message", (event) => {});

```

The error message:

```auto
ERROR in ./src/main.ts
Module not found: Error: Can't resolve './worker' in 'C:\Users\xxx\IdeaProjects\webapp\src'
 @ ./src/main.ts 3:0-44 5:23-29
 @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
 @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper

```

Here is a working example: [GitHub - JamesLMilner/webpack-tsc-worker: An example of using Workers built with TypeScript and Webpack](https://github.com/JamesLMilner/webpack-tsc-worker) (but without Aurelia)
