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

'threads' doesn't compatiable with webpack multi-compiler #56

Closed
fangbinwei opened this issue Dec 1, 2020 · 0 comments · Fixed by #69
Closed

'threads' doesn't compatiable with webpack multi-compiler #56

fangbinwei opened this issue Dec 1, 2020 · 0 comments · Fixed by #69

Comments

@fangbinwei
Copy link

fangbinwei commented Dec 1, 2020

  • Operating System: macOS
  • Node Version: 12.14.0
  • NPM Version: 6.13.4 (yarn 1.22.10)
  • webpack Version: 4.44.2/webpack@5
  • eslint-webpack-plugin Version: 2.4.1

Thanks to the contributors of this plugin, it solves many pain points of eslint-loader.

We are using webpack to output different type of bundle through multi-compiler. If setting threads of eslint-webpack-plugin, the output will be incomplete. So it's not recommended to use this option with webpack multi-compiler?
Or it can be fixed in webpack? The result of webpack@4 and webpack@5 is similar.

Expected Behavior

bundle output should be

dist
├── desktop.js
└── mobile.js

Actual Behavior

bundle output is incomplete

dist
├── desktop.js

[email protected] and [email protected] with threads

bundle output: incomplete
console output

[webpack-cli] Compilation finished
✨  Done in 2.93s.

Some of our project's tests are based on the output of webpack. So the incomplete console output let the tests fail after bumping the version of eslint-webpack-plugin to 2.4.1.

[email protected] and [email protected] with threads

bundle output: High probability incomplete, Small probability complete(according to the test of reproducible repo)
console output

[webpack-cli] Compilation finished
[webpack-cli] Compilation finished
Hash: d3616dbfeab31a03f79ed3616dbfeab31a03f79e
Version: webpack 4.44.2
Child mobile:
    Hash: d3616dbfeab31a03f79e
    Time: 508ms
    Built at: 12/02/2020 5:04:22 AM
        Asset        Size  Chunks             Chunk Names
    mobile.js  1010 bytes       0  [emitted]  main
    Entrypoint main = mobile.js
    [0] ./src/index.js 38 bytes {0} [built]
Child desktop:
    Hash: d3616dbfeab31a03f79e
    Time: 537ms
    Built at: 12/02/2020 5:04:22 AM
         Asset        Size  Chunks             Chunk Names
    desktop.js  1010 bytes       0  [emitted]  main
    Entrypoint main = desktop.js
    [0] ./src/index.js 38 bytes {0} [built]
✨  Done in 2.12s.

How Do We Reproduce?

Reproducible repo

@fangbinwei fangbinwei changed the title 'threads 'threads' doesn't compatiable with webpack multi-compiler Dec 1, 2020
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

Successfully merging a pull request may close this issue.

1 participant