Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kunlongxu opened this issue Apr 24, 2018 · 5 comments
Open

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

kunlongxu opened this issue Apr 24, 2018 · 5 comments
Labels

Comments

@kunlongxu
Copy link

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"
              }
            }
          }
        ]
      }
@Brooooooklyn
Copy link
Collaborator

Brooooooklyn commented May 13, 2018

There was some workarounds to avoid the conflict between ts-loder and thread-loader/happypack, I will create a minimal example to show a workaround when I have time.

@ChiaJune
Copy link

same issue, is there a solution? @Brooooooklyn

1 similar comment
@ghost
Copy link

ghost commented Oct 22, 2018

same issue, is there a solution? @Brooooooklyn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants
@Brooooooklyn @ChiaJune @kunlongxu and others