Avatar for the web-infra-dev user
web-infra-dev
rspack
BlogDocsChangelog

fix: Add $schema field for the swc config validation

#10535Merged
Comparing
n0th1ng-else:swcrc-validation
(
fb5084c
) with
main
(
40f1489
)
CodSpeed Performance Gauge
0%
Improvements
0
Regressions
0
Untouched
12
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

rust@bundle-basic
tasks/benchmark/benches/groups/basic_build.rs::basic::basic_benchmark::rust@bundle-basic
CodSpeed Performance Gauge
+1%
4.1 ms
4.1 ms
js@Traverse compilation.modules
tests/bench/ts-react.bench.ts::TypeScript React project::js@Traverse compilation.modules
CodSpeed Performance Gauge
+1%
68.2 µs
67.7 µs
js@Traverse module graph by connections
tests/bench/ts-react.bench.ts::TypeScript React project::js@Traverse module graph by connections
CodSpeed Performance Gauge
0%
293.6 µs
292.4 µs
js@is css mod
tests/bench/ts-react.bench.ts::TypeScript React project::js@is css mod
CodSpeed Performance Gauge
0%
91.1 µs
90.8 µs
js@record chunk group
tests/bench/ts-react.bench.ts::TypeScript React project::js@record chunk group
CodSpeed Performance Gauge
0%
93 µs
92.7 µs
js@stats.toJson()
tests/bench/ts-react.bench.ts::TypeScript React project::js@stats.toJson()
CodSpeed Performance Gauge
0%
25.2 ms
25.1 ms
rust@build_chunk_graph_parallel
tasks/benchmark/benches/groups/build_chunk_graph.rs::chunk_graph::build_chunk_graph_benchmark::rust@build_chunk_graph_parallel
CodSpeed Performance Gauge
0%
72.1 ms
72 ms
js@collect imported identifiers
tests/bench/ts-react.bench.ts::TypeScript React project::js@collect imported identifiers
CodSpeed Performance Gauge
0%
222.9 µs
222.6 µs
rust@bundle-basic_sourcemap
tasks/benchmark/benches/groups/basic_build.rs::basic::basic_benchmark::rust@bundle-basic_sourcemap
CodSpeed Performance Gauge
0%
4.3 ms
4.3 ms
js@Traverse module graph by dependencies
tests/bench/ts-react.bench.ts::TypeScript React project::js@Traverse module graph by dependencies
CodSpeed Performance Gauge
0%
566.9 µs
566.8 µs
js@record module
tests/bench/ts-react.bench.ts::TypeScript React project::js@record module
CodSpeed Performance Gauge
0%
2 ms
2 ms
rust@build_chunk_graph
tasks/benchmark/benches/groups/build_chunk_graph.rs::chunk_graph::build_chunk_graph_benchmark::rust@build_chunk_graph
CodSpeed Performance Gauge
0%
93.6 ms
93.8 ms

Commits

Click on a commit to change the comparison range
Base
main
40f1489
0%
fix: Add $schema field for the swc config validation According to swc documentation, we are able to narrow the json type for the configuration object. https://swc.rs/docs/configuration/swcrc ```json { "$schema": "https://swc.rs/schema.json", } ``` In fact, rspack now throws a validation error ``` - Invalid options of 'builtin:swc-loader': Invalid configuration object. Rspack has been initialized using a configuration object that does not match the API schema. - Unrecognized key(s) in object: '$schema' at "module.rules[0].oneOf[6]" ``` I suggest fixing the validation schema
fb5084c
2 days ago
by n0th1ng-else
© 2025 CodSpeed Technology
Home Terms PrivacyDocs