vercel / vercel/ncc

Fork ts-loader with permissive compilation

Open
#362 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
9.8k
Forks
326
PR merge metrics
No merged PRs in 30d

Description

This is a tracking issue for https://github.com/zeit/ncc/issues/357 and https://github.com/zeit/ncc/issues/321 which are both related to the ts-loader default behaviours that require a fork to change.

TypeScript has a flag, noEmitOnError in the tsconfig.json file, that should allow emitting JS even when there are type errors, however this is not observed by ts-loader.

Basically the philosophy of ts-loader is very much based on strict compilation of configurations and all TypeScript files in the project, with all errors carefully propagated (and causing the build to stop).

A new loader could be forked from ts-loader with a more permissive philosophy to allow builds to still complete with errors so users can still execute their code.

Perhaps ts-loader would be open to upstreaming of this as well. //cc @johnnyreilly

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked ncc issues #357 and #321, then review ts-loader's handling of TypeScript's noEmitOnError option. Define the fork's scope and confirm that the resulting loader can emit JavaScript and complete builds when type errors are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.