{"id":14795,"library":"parcel-plugin-typescript","title":"Parcel TypeScript Plugin (Parcel 1)","description":"parcel-plugin-typescript provides enhanced TypeScript integration for Parcel 1, extending beyond Parcel's native transpiling. Key features include full type checking in a separate process for performance, on-the-fly path mappings based on `tsconfig.json`'s `paths` and `baseUrl` options, and support for custom AST transformers. This plugin aims to offer a comprehensive TypeScript development experience similar to `awesome-typescript-loader` or `ts-loader` in Webpack. The package is currently at version 1.0.0, specifically designed for Parcel 1.x environments. With Parcel 1 no longer actively maintained and superseded by Parcel 2, this plugin is considered unsupported for modern Parcel workflows. There is no ongoing release cadence, and the project repository indicates inactivity since 2019.","status":"abandoned","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/fathyb/parcel-plugin-typescript","tags":["javascript","typescript"],"install":[{"cmd":"npm install parcel-plugin-typescript","lang":"bash","label":"npm"},{"cmd":"yarn add parcel-plugin-typescript","lang":"bash","label":"yarn"},{"cmd":"pnpm add parcel-plugin-typescript","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for Parcel 1.x.","package":"parcel-bundler","optional":false},{"reason":"Required peer dependency for TypeScript compilation and type checking.","package":"typescript","optional":false}],"imports":[],"quickstart":{"code":"{\n  \"name\": \"parcel-ts-plugin-example\",\n  \"version\": \"1.0.0\",\n  \"scripts\": {\n    \"start\": \"parcel src/index.html --open\",\n    \"build\": \"parcel build src/index.html\"\n  },\n  \"devDependencies\": {\n    \"parcel-bundler\": \"^1.9.0\",\n    \"parcel-plugin-typescript\": \"^1.0.0\",\n    \"typescript\": \"^2.4.0\"\n  }\n}\n// package.json\n\n{\n  \"compilerOptions\": {\n    \"target\": \"es5\",\n    \"module\": \"commonjs\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"baseUrl\": \"./src\",\n    \"paths\": {\n      \"@utils/*\": [\"utils/*\"]\n    }\n  },\n  \"parcelTsPluginOptions\": {\n    \"transpileOnly\": false\n  }\n}\n// tsconfig.json\n\n<!-- src/index.html -->\n<!DOCTYPE html>\n<html>\n<head>\n  <title>Parcel TS Plugin Example</title>\n</head>\n<body>\n  <h1>Parcel 1 + TypeScript Plugin</h1>\n  <div id=\"app\"></div>\n  <script src=\"index.ts\"></script>\n</body>\n</html>\n\n// src/utils/helper.ts\nexport function getMessage(name: string): string {\n  return `Hello from ${name}!`;\n}\n\n// src/index.ts\nimport { getMessage } from '@utils/helper'; // Demonstrates path mapping\n\nconst appDiv = document.getElementById('app');\nif (appDiv) {\n  appDiv.innerHTML = getMessage(\"Parcel TS Plugin\");\n}\n\n// Intentionally introduce a type error to show type checking works (if transpileOnly is false)\n// const wrongType: number = \"this is a string\";\n\nconsole.log(getMessage(\"console\"));\n\n","lang":"typescript","description":"This quickstart demonstrates setting up a basic Parcel 1 project with `parcel-plugin-typescript`. It includes `package.json` with dependencies and scripts, `tsconfig.json` configured for path mappings and plugin options, an `index.html` to load the TypeScript, and example TypeScript files (`index.ts` and `utils/helper.ts`) using path aliases."},"warnings":[{"fix":"For Parcel 2.x, remove `parcel-plugin-typescript` and rely on Parcel's native TypeScript integration, which includes type checking, or consider community plugins specifically designed for Parcel 2.","message":"This plugin is designed exclusively for Parcel 1.x. It is not compatible with Parcel 2.x, which has its own significantly improved built-in TypeScript support. Attempting to use this plugin with Parcel 2 will result in build failures or it being ignored.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Consider migrating to Parcel 2.x or an alternative bundler with active TypeScript support.","message":"The project is no longer actively maintained. The last commit on GitHub was in 2019, coinciding with the shift towards Parcel 2. This means no new features, bug fixes, or security updates will be provided.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"If Angular support for Parcel 1 is needed, investigate `parcel-plugin-angular` or migrate to a modern Angular CLI setup that uses Webpack or Vite.","message":"Angular support, previously mentioned as an upcoming feature or implicitly supported, was moved to a separate plugin, `parcel-plugin-angular`. This plugin does not provide specialized Angular integration.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure `transpileOnly` is set to `false` in your `tsconfig.json` under `parcelTsPluginOptions` to enable full type checking during the build process.","message":"Type checking can be disabled via the `transpileOnly: true` option in `parcelTsPluginOptions` within `tsconfig.json`. If type errors are not appearing, verify this setting is `false`.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure `baseUrl` and `paths` are correctly configured in `tsconfig.json`. Verify that `parcel-plugin-typescript` is installed and that Parcel is discovering the plugin. Also, check for typos in the import paths.","cause":"TypeScript path mappings (e.g., `baseUrl`, `paths` in `tsconfig.json`) are not being correctly applied or resolved by Parcel.","error":"Error: Cannot find module '@path/to/module'"},{"fix":"Set `\"transpileOnly\": false` in the `parcelTsPluginOptions` object within your `tsconfig.json`. Confirm that `parcel-plugin-typescript` is listed in your `devDependencies` and Parcel 1.x is installed.","cause":"The `transpileOnly` option in `parcelTsPluginOptions` is set to `true`, disabling full type checking, or the plugin is not correctly integrated/discovered.","error":"TypeScript errors are not displayed during `parcel build` or `parcel watch`."},{"fix":"Ensure `parcel-plugin-typescript` is listed in your `devDependencies` or `dependencies` in `package.json`. Confirm you are using Parcel 1.x (e.g., `parcel-bundler` version `^1.9.0`) and not Parcel 2.x.","cause":"Parcel 1.x failed to discover and load the plugin, or the wrong Parcel version is being used.","error":"Plugin 'parcel-plugin-typescript' was not found."}],"ecosystem":"npm"}