Replies: 1 comment 17 replies
-
No related to webpack |
Beta Was this translation helpful? Give feedback.
17 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
What is the current behavior?
Referencing a loader written in TypeScript works just as expected, except when the loader's TypeScript file is inside
node_modules.If the current behavior is a bug, please provide the steps to reproduce.
node_modulesdirectory and change the path in the webpack file to point to the new location.SyntaxError: Cannot use import statement outside a module, as webpack fails to interpret the file as TypeScript.What is the expected behavior?
TypeScript webpack loaders should work even when placed in a directory named "node_modules", just the same as they work from any other directory.
Other relevant information:
webpack version: 5.35.1 / 4.6.0 (CLI)
Node.js version: 14.16.0
Operating System: macOS
Additional tools: ts-loader 9.1.1, ts-node 9.1.1, TypeScript 4.2.4
Beta Was this translation helpful? Give feedback.
All reactions