ts-plugin / ts-plugin/ts-import-plugin

Record the conflict between ts-import-plugin and thread-loader

Open
#57 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
TypeScript
Stars
603
Forks
36
Avg merge
1m
Merged PRs (30d)
1

Description

I don't know who this should be assigned to.
webpack 3.10.0
webpack 4.5.0 also have same problem.
@Brooooooklyn You can take a look.

{
        test: /\.tsx?$/,
        exclude: /node_modules/,
        use: [
          { loader: "cache-loader" },
          // {
          //   loader: "thread-loader",
          //   options: {
          //     // there should be 1 cpu for the fork-ts-checker-webpack-plugin
          //     workers: require("os").cpus().length - 1
          //   }
          // },
          { loader: "react-hot-loader/webpack" },
          {
            loader: "ts-loader",
            options: {
              // transpileOnly: true,
              happyPackMode: true, // IMPORTANT! use happyPackMode mode to speed-up compilation and reduce errors reported to webpack
              getCustomTransformers: () => ({
                before: [
                  tsImportPluginFactory({
                    style: true
                  })
                ]
              }),
              compilerOptions: {
                module: "esnext"
              }
            }
          }
        ]
      }

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 webpack loader configuration shown in the issue and reproduce it with webpack 3.10.0 and 4.5.0. Compare the behavior when thread-loader is enabled alongside ts-import-plugin and ts-loader; done requires establishing and recording the conflict and its expected resolution.

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.