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

process not closing with thread-loader 2.1.3 #87

Open
includeios opened this issue Mar 29, 2020 · 8 comments
Open

process not closing with thread-loader 2.1.3 #87

includeios opened this issue Mar 29, 2020 · 8 comments

Comments

@includeios
Copy link

includeios commented Mar 29, 2020

the question is same as #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

@alexander-akait
Copy link
Member

@includeios sorry for delay, problem still exist?

@Kim1am
Copy link

Kim1am commented Mar 19, 2021

@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

@ThomasChan
Copy link

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.

@huyaocode
Copy link

huyaocode commented Oct 26, 2021

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

@pedro-abundio-wang
Copy link

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

Me too! How to solve this problem?

@blockmood
Copy link

  • 1

@wangzhics
Copy link

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

@wangzhics
Copy link

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

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

No branches or pull requests

8 participants