thread-loader
thread-loader copied to clipboard
process not closing with thread-loader 2.1.3
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 sorry for delay, problem still exist?
@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
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.
I have same problem when using webpack 5, and my version is 3.0.4.
I have same problem when using webpack 5, and my version is 3.0.4.
Me too! How to solve this problem?
- 1
threadLoader.warmup will trigger this bug; just remove warmup. webpack loaders will still work with thread-loader on multi worker
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