The ts-loader tag has no usage guidance.
217 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Unanswered (my tags)
Ts-Loader Won't Allow Dynamic Module Imports
I am trying to compile a simple index.ts file using webpack's ts-loader; the file uses dynamic imports. In my webpack.config.js I have my alias set to: Images: `path.resolve(__dirname, './src/images'),...
- 3
Different build result between npm and pnpm
Recently, I have used pnpm instead of npm in the program. I built the project(pnpm run build) and received a ts error. (ts-loader in the webpack) It seems a TS error. but when I used npm it didn't ...
- 111
Webpack + ts-loader fails on stage 3 decorators: Unexpected character '@'
The following code: const decorator = (constructor: any, _context: any) => constructor @decorator export class Decorated {} fails in Webpack + ts-loader with the message: Unexpected character '@' ...
- 37.6k
react ts-loader not working with babel loader webpack
Trying to use ts-loader with my webpack configuration, but I keep getting errors on the terminal when I try to build. ERROR in ./src/index.ts 4:12 Module parse failed: Unterminated regular expression (...
- 1,055
Does 'ts-loader' require 'typescript' to be installed inorder to work? For me it worked fine
The npm documentation for using ts-loader suggests installing typescript and so does the official Typescript guide in webpack documentation without actually providing any reasoning behind it. For me, ...
- 10.7k
Webpack: import TypeScript module both "normally" and as raw string
Using webpack ^v2.2.1, I would like to import a TypeScript module as text, in addition to importing the same module "normally". I've figured that I probably should use the raw-loader. But it isn't ...
- 17.6k
How to get webpack to report typescript errors in HTML templates
I have inherited a project that is stuck on webpack 4 / angular 11 / lerna bootstrap that I am trying to upgrade to webpack 5 / workspaces etc. and it's like a Rubix cube (or Lament Configuration), so ...
- 4,502
Webpack can't seem to load css
I am trying to create a npm package for a single .tsx component however When I run wepback I keep getting this error: ERROR in ./src/Chatbot.tsx 184:20 Module parse failed: Unexpected token (184:20) ...
- 495
Webpack cant resolve TypeScript modules
I build a relay small webpack and typescript demo to play with. If i run webpack with the webpack.config.js i get this error: ERROR in ./js/app.ts Module not found: Error: Can't resolve './MyModule' ...
- 2,896
How to properly configure swc-loader with webpack, when switching from ts-loader for better build performance
I have a ts-loader configuration in webpack, test: /\.tsx?$/, use: [ { loader: 'ts-loader', options: { transpileOnly: true } } ] This was taking like 5 mins of build time. so, ...
- 3,241
Webpack cant compile ts 3.7 (Optional Chaining, Nullish Coalescing)
I try to use typescript 3.7 features like Optional Chaining, Nullish Coalescing. But webpack gives me an error while transpaling. app: Module parse failed: Unexpected token (50:40) app: File was ...
- 831
Problems importing Typescript and Js files in node modules
I am importing a node module folder that contains both Typescript and JS files. I use ts-loader for the typescript, but for some reason, it is creating a long list of errors and I think it's because ...
- 2,451
ts-loader outputs declaration files in subdirectory when importing .json files
I'm having a strange behavior of my ts-loader: When importing *.json file from node_modules the declaration files are generated in a subfolder of dist/ but I expect them to be directly in the dist/ ...
- 93
How to replace angular2-template-loader in Webpack 5 with ts-loader
I've inherited a Webpack4 Angular 11 lerna bootstrap repo, and I'd like to get us on Webpack5 (as well as workspaces etc.) This repo uses angular2-template-loader with ts-loader and fork-ts-checker-...
- 39.4k
Typescript Source not showing when using webpack ts-loader
I'm using webpack and ts-loader from a grunt task to transpile Typescript and generate sourcemaps for use debugging production. My team wants to be able to see the original Typescript source, not ...
- 39.1k
153050per page