{"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.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install parcel-plugin-typescript"],"cli":null},"imports":[],"auth":{"required":false,"env_vars":[]},"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}