Skip to content

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

@kunlongxu

Description

@kunlongxu

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"
              }
            }
          }
        ]
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions