TypeStrong / TypeStrong/ts-loader

ts-loader with thread-loader doesn't work in transpileonly mode

Open
#1,618 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.5k
Forks
439
Avg merge
17h 17m
Merged PRs (30d)
2

Description

Expected Behaviour

When using the thread-loader, the ts-loader checks for hasForkTsCheckerWebpackPlugin to enable transpile only mode,
but since the settings are stringified and parsed again, the constructor name is Object and not ForkTsCheckerWebpackPlugin anymore. There needs to be another way of using transpile only, eg via happypackmode or similar.

Actual Behaviour

The hasForkTsCheckerWebpackPlugin always returns false disabling the transpileonly mode.

Steps to Reproduce the Problem

use thread-loader with forktscheckerwebpackplugin and output the value of hasForkTsCheckerWebpackPlugin

Location of a Minimal Repository that Demonstrates the Issue.

Contributor guide

Open the contributing guide

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 by reproducing the issue with thread-loader and ForkTsCheckerWebpackPlugin, then inspect how ts-loader determines hasForkTsCheckerWebpackPlugin after settings are stringified and parsed. Done means transpileonly mode is enabled in this setup rather than being disabled because the constructor name becomes Object.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, webpack
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.