{"id":18975,"library":"awesome-typescript-loader","title":"awesome-typescript-loader","description":"A TypeScript loader for Webpack 4.x that integrates with Babel and supports caching and forked type-checking. v5.2.1 is the latest stable release, targeting TypeScript 2.7+ and Webpack 4. Notably, the loader can fork the type-checker to a separate process for faster development builds. Offers first-class Babel integration with caching, significantly reducing rebuild times when combined. However, for Windows users, paths may need correction. The loader is considered a mature alternative to ts-loader but slower for some workloads; consider ts-loader with HappyPack or thread-loader for those cases. See GitHub for full README.","status":"maintenance","version":"5.2.1","language":"javascript","source_language":"en","source_url":"https://github.com/s-panferov/awesome-typescript-loader","tags":["javascript","webpack","loader","webpack-loader","typescript"],"install":[{"cmd":"npm install awesome-typescript-loader","lang":"bash","label":"npm"},{"cmd":"yarn add awesome-typescript-loader","lang":"bash","label":"yarn"},{"cmd":"pnpm add awesome-typescript-loader","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; requires TypeScript ^2.7 || ^3 for v5.x","package":"typescript","optional":false}],"imports":[{"note":"Use as a webpack loader rule, not as a direct import. The loader is configured via webpack config, not imported in source code.","wrong":"const atl = require('awesome-typescript-loader')","symbol":"awesome-typescript-loader","correct":"module.exports = { module: { rules: [ { test: /\\.tsx?$/, loader: 'awesome-typescript-loader' } ] } }"},{"note":"CheckerPlugin is a named export that is CommonJS exported. Use require for webpack config files (CJS). ESM import also works in webpack config, but require is common.","wrong":"import { CheckerPlugin } from 'awesome-typescript-loader'","symbol":"CheckerPlugin","correct":"const { CheckerPlugin } = require('awesome-typescript-loader')"},{"note":"TypeScript type import for loader options. Use import type for type-only imports if desired.","wrong":"const LoaderOptions = require('awesome-typescript-loader').LoaderOptions","symbol":"LoaderOptions","correct":"import { LoaderOptions } from 'awesome-typescript-loader'"}],"quickstart":{"code":"// webpack.config.js\nconst path = require('path');\nconst { CheckerPlugin } = require('awesome-typescript-loader');\n\nmodule.exports = {\n  entry: './src/index.ts',\n  output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js' },\n  resolve: { extensions: ['.ts', '.tsx', '.js', '.jsx'] },\n  devtool: 'source-map',\n  module: { rules: [ { test: /\\.tsx?$/, loader: 'awesome-typescript-loader' } ] },\n  plugins: [ new CheckerPlugin() ]\n};","lang":"javascript","description":"Minimal webpack configuration using awesome-typescript-loader with CheckerPlugin for async error reporting."},"warnings":[{"fix":"Use forward slashes in paths (e.g., './src/**/*.ts' instead of '.\\src\\**\\*.ts').","message":"On case-insensitive file systems (Windows/macOS), file path mismatches can cause 'Loader did not return a buffer of string' errors. Use Unix-style paths in tsconfig include/exclude.","severity":"gotcha","affected_versions":">=3.2.0"},{"fix":"Upgrade to v3.2.0 or later; micromatch is more performant.","message":"Use of minimatch for file filtering in tsconfig was replaced by micromatch in v3.2.0.","severity":"deprecated","affected_versions":"<3.2.0"},{"fix":"Use hard-source-webpack-plugin for build caching; do not combine with thread-loader.","message":"The loader does not support HappyPack or thread-loader directly; for parallel builds, consider ts-loader with those plugins. ATL works better with hard-source-webpack-plugin for caching.","severity":"gotcha","affected_versions":">=5.0.0"},{"fix":"Ensure you have TypeScript ^2.7 or ^3 and webpack 4.x.","message":"Version 5.0.0 dropped support for TypeScript < 2.7 and Webpack < 4.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Use CheckerPlugin and optionally set 'errorsAsWarnings' to true.","message":"The 'silent' option may not silence all output; CheckerPlugin is needed for proper error reporting in watch mode.","severity":"deprecated","affected_versions":">=3.2.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure all paths in tsconfig.json use consistent casing and forward slashes.","cause":"File path mismatches on case-insensitive file systems due to incorrect path casing in tsconfig.","error":"Loader did not return a buffer or string"},{"fix":"Install TypeScript: npm install typescript --save-dev. Ensure version matches peer requirement (^2.7 || ^3).","cause":"Missing or incompatible peer dependency 'typescript' not installed or wrong version.","error":"TypeError: Cannot read property 'version' of undefined"},{"fix":"Remove CheckerPlugin for production builds or add WatchIgnorePlugin to ignore node_modules. Alternatively, use 'forceIsolatedModules' to skip type checking in production.","cause":"CheckerPlugin requires watch mode; it cannot be used in production builds without WatchIgnorePlugin.","error":"Error: The 'CheckerPlugin' is only allowed when using watch mode or when using webpack-dev-server."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}