diff --git a/10000.bench.ts b/10000.bench.ts new file mode 100644 index 00000000..36614331 --- /dev/null +++ b/10000.bench.ts @@ -0,0 +1,20 @@ +import { bench, describe } from "vitest"; +import { rspack } from "@rspack/core"; +import rspackConfig from './cases/10000/rspack.config'; + +describe("10000 modules project", () => { + bench("build with development mode", () => new Promise((resolve, reject) => { + rspack({ + ...rspackConfig, + mode: "development" + }, (err, stats) => { + if (err) { + reject(err); + } + if (stats?.hasErrors()) { + reject(new Error(stats.toString({}))); + } + resolve(); + }); + })); +}); diff --git a/vitest.config.ts b/vitest.config.ts index 4f0ca66c..4c4250e1 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,6 +2,8 @@ import codspeedPlugin from "@codspeed/vitest-plugin"; import { defineConfig } from "vitest/config"; export default defineConfig({ - plugins: [codspeedPlugin()] - // ... + plugins: [codspeedPlugin()], + test: { + fileParallelism: true + }, });