awesome-typescript-loader icon indicating copy to clipboard operation
awesome-typescript-loader copied to clipboard

Module not found on import line?

Open ChrisTucker2000 opened this issue 6 years ago • 1 comments

I'm trying to build a fairly simple project using Webpack and TypeScript.

My file structure:

  • /scripts/main.tsx
  • /scripts/utils/JSX.ts

main.tsx includes the following line: import JSX from "./utils/JSX";

When I run the official TypeScript compiler, tsc, it builds fine. However, when I try to build it with Webpack and awesome-typescript-loader, I get the following error: Module not found: Error: Can't resolve './utils/jsx'

Any idea what's going on here? I've been struggling with this for hours and can't figure it out.

ChrisTucker2000 avatar Mar 03 '18 09:03 ChrisTucker2000

Do you have Windows or Linux ? If Linux does rename to jsx.ts helps?

sherlock1982 avatar Mar 08 '18 17:03 sherlock1982