diff --git a/package.json b/package.json index 7c3f06f84e2..1fca576910f 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "license": "MIT", "description": "A Fast Rust-based web bundler", "private": true, + "main": "./packages/rspack/dist/index.js", "scripts": { "x": "zx x.mjs", "dev": "pnpm --filter @rspack/cli run dev", diff --git a/webpack-test/ConfigTestCases.template.js b/webpack-test/ConfigTestCases.template.js index f02a130efe4..6b2c83cd2ba 100644 --- a/webpack-test/ConfigTestCases.template.js +++ b/webpack-test/ConfigTestCases.template.js @@ -59,7 +59,9 @@ const describeCases = config => { stderr = captureStdio(process.stderr, true); }); afterEach(() => { - stderr.restore(); + if (stderr) { + stderr.restore(); + } }); jest.setTimeout(TIMEOUT); @@ -88,10 +90,12 @@ const describeCases = config => { const cacheDirectory = path.join(outBaseDir, ".cache", testSubPath); let options, optionsArr, testConfig; beforeAll(() => { - options = prepareOptions( - require(path.join(testDirectory, "webpack.config.js")), - { testPath: outputDirectory } - ); + expect(() => { + options = prepareOptions( + require(path.join(testDirectory, "webpack.config.js")), + { testPath: outputDirectory } + ); + }).not.toThrow(); optionsArr = [].concat(options); optionsArr.forEach((options, idx) => { if (!options.context) options.context = testDirectory; diff --git a/webpack-test/configCases/async-library/0-create-library/test.filter.js b/webpack-test/configCases/async-library/0-create-library/test.filter.js deleted file mode 100644 index 3be456dcd23..00000000000 --- a/webpack-test/configCases/async-library/0-create-library/test.filter.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = () => {return false} \ No newline at end of file diff --git a/webpack-test/configCases/issues/issue-7563/test.filter.js b/webpack-test/configCases/issues/issue-7563/test.filter.js deleted file mode 100644 index 3be456dcd23..00000000000 --- a/webpack-test/configCases/issues/issue-7563/test.filter.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = () => {return false} \ No newline at end of file