thread-loader icon indicating copy to clipboard operation
thread-loader copied to clipboard

process not closing with thread-loader 2.1.3

Open includeios opened this issue 5 years ago • 8 comments
trafficstars

the question is same as https://github.com/webpack-contrib/thread-loader/issues/56, but my version is 2.1.3, and my webpack configuration is like this:

...
const threadLoader = require('thread-loader');
...
const jsWorkerPool = {
   poolTimeout: 2000,
   workerParallelJobs: 200,
};
threadLoader.warmup({ jsWorkerPool }, ['vue-loader', 'babel-loader'])
...
 rules: [
      {
        test: /\.vue$/,
        use: [
          {
            loader: 'thread-loader',
            options: jsWorkerPool,
          },
          'vue-loader',
        ],
      },
      {
        test: /\.js$/,
        use: [
          {
            loader: 'thread-loader',
            options: jsWorkerPool,
          },
          'babel-loader',
        ],
        exclude: /node_modules/,
      },
      {
        test: /\.css$/,
        use: ['vue-style-loader', MiniCssExtractPlugin.loader, ...cssOptions],
      },
      {
        test: /\.scss$/,
        use: ['vue-style-loader', MiniCssExtractPlugin.loader, ...sassOptions],
      },
     ...
]

my vue version is 2.6.10, vue-loader version is 15.9.0, i do not know if the version of vue-loader and vue-style-loader affects it

includeios avatar Mar 29 '20 02:03 includeios

@includeios sorry for delay, problem still exist?

alexander-akait avatar Sep 12 '20 16:09 alexander-akait

@includeios sorry for delay, problem still exist?

I got the same problem. my version is "thread-loader": "^2.1.2", "vue-loader": "^15.7.0", threadLoader.warmup({}, ['vue-loader', 'babel-loader', 'vue-markdown-loader']) module: { rules: [ { test: /\.js$/, exclude: [ /node_modules/, resolve('src/components/el-expand/src/utils/popper.js') ], use: ['thread-loader', 'babel-loader'] }, { test: /\.md$/, use: ['thread-loader', 'vue-loader', 'vue-markdown-loader'] } ] },

when i add warmup in build code and after npm run build. My cmd process was not close. Although i can see 'DONE Build complete' in my cmd window, node still running.when i delete warmup code everything is fine

Kim1am avatar Mar 19 '21 02:03 Kim1am

same problem, and i was using thread-loader and eslint,and i tried modify eslint cli's process.exitCode = to process.exit(code) , problem gone.

ThomasChan avatar Jul 30 '21 06:07 ThomasChan

I have same problem when using webpack 5, and my version is 3.0.4.

huyaocode avatar Oct 26 '21 08:10 huyaocode

I have same problem when using webpack 5, and my version is 3.0.4.

Me too! How to solve this problem?

pedro-abundio-wang avatar Sep 17 '22 03:09 pedro-abundio-wang

  • 1

blockmood avatar Jul 04 '23 10:07 blockmood

threadLoader.warmup will trigger this bug; just remove warmup. webpack loaders will still work with thread-loader on multi worker

wangzhics avatar Jul 28 '23 12:07 wangzhics

threadLoader.warmup will trigger this bug; just remove warmup. webpack loaders will still work with thread-loader on multi worker

warmup will create multi process and hold on, so the main process will not exit

wangzhics avatar Jul 28 '23 12:07 wangzhics