test: add coverage for nwjs exports condition#20530
test: add coverage for nwjs exports condition#20530alexander-akait merged 1 commit intowebpack:mainfrom
Conversation
|
|
@aryanraj45 Please avoid creations of new PRs for each tests (CI is slow due a lot of PRs and tests), if you want to add many of them just send a PR with the list of added tests or at least group them |
okk sure will take care of it to group them from next time onwards |
7bd3ae8 to
1538a7a
Compare
|
@alexander-akait grouped the CSS modular test into this exisitng one of nwjs export test as suggested |
|
@alexander-akait can u please check once CI has been stopped |
|
@aryanraj45 Because we have a lot of PRs and out CI is busy, it will be resolved automatically when we will have free macos runners |
yeah its been completed as well now u can have a look! thank. you so much |
|
This PR is packaged and the instant preview is available (f8a5ac3). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@f8a5ac3
yarn add -D webpack@https://pkg.pr.new/webpack@f8a5ac3
pnpm add -D webpack@https://pkg.pr.new/webpack@f8a5ac3 |
Summary
This PR adds two configCases that had no test coverage:
test/configCases/target/nwjs/-target: "nwjs"injects the"nwjs"condition into webpack's resolver (viaconditions.push("nwjs")inlib/config/defaults.js), but there was no test verifying this condition is actually applied during module resolution. The test requires a package with anexportsfield containing a"nwjs"condition and asserts the correct file is resolved.test/configCases/css/webworker/—CssModulesPluginskips emitting a CSS file whenchunkLoadingis"import-scripts"(webworker target), but CSS module JS exports still work. The test verifies thatcomposes:is correctly resolved and the generated class names are present in the export.What kind of change does this PR introduce?
test
Did you add tests for your changes?
This PR is the tests. It adds
test/configCases/target/nwjs/andtest/configCases/css/webworker/.Does this PR introduce a breaking change?
No.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
No documentation needed.