[Tracking]: Testing against webpack core tests #4327
Labels
team
The issue/pr is created by the member of Rspack.
tracking issue
Category: A tracking issue for an RFC or an unstable feature.
Milestone
Rspack is running webpack tests to discover current implementations and functionalities misaligned with webpack.
Our goal is to maintain consistency with webpack as much as possible, but there are still some features that require discussion to determine whether or not to support them. These include APIs that have alternative ECMAScript standards or features that have high support costs but are used by very few people. This issue is meant to track these inconsistencies, and we will continue to improve test coverage and pass rates in the future.
We have already run some tests at the moment. Of course, we welcome your help in advancing the testing progress and discovering any issues. This may require a certain level of familiarity with webpack's code to identify the underlying causes of test failures.
The following are the steps to advance the testing progress:
pnpm run build:cli:debug
orpnpm run build:cli:release
to make sure you are on the latest build.cd webpack-test
and find a test that you want to run.test.filter.js
under the test case is returning true.pnpm run test -- -t "test name"
, for example, if you want to runwebpack-test/cases/amd/define-needs-module
, you can use the following commandpnpm run test -- -t "amd define-needs-module"
test.filter.js
under the test case.test.filter.js
return a string that contain the reason, and it would be better to create a issue and use the link as the reason, for examplemodule.exports = () => {return "https://github.com/web-infra-dev/rspack/issues/4313"}
And the principle is not to modify the code of
webpack-test
's test to make the test passes. Instead, focus on tracking all inconsistencies as much as possible.Here are some of the identified issues:
Unsupported features
optimization.concatenateModules
#3823Parser hook/Compile time evaluation
TreeShaking/SideEffects
SplitChunks
CSS
Sourcemap
Output
output.chunkFilename
#5395Node API
loaderContext.importModule
#4398loaderContext.loadModule
#3738Dependency/Codegen
__webpack_nonce__
#4401__webpack_is_included__
#4443import.meta.webpackHot.data
#5596Errors/Warnings inconsistent
ContextModule
Panic bug
""
#3180!
at the end #5579Test Infrastructure
hotTestCases
#5582The text was updated successfully, but these errors were encountered: