Skip to content

Commit 62bad72

Browse files
authored
chore: optimize the initialization of instance (#2432)
1 parent 34d89ce commit 62bad72

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.changeset/beige-moose-destroy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rspack/core": patch
3+
---
4+
5+
optimize the initialization of instance

packages/rspack/src/compiler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ class Compiler {
139139
* Lazy initialize instance so it could access the changed options
140140
*/
141141
get #instance() {
142-
const options = getRawOptions(this.options, this);
143142
this.#_instance =
144143
this.#_instance ??
145144
new binding.Rspack(
146-
options,
145+
getRawOptions(this.options, this),
147146
{
148147
make: this.#make.bind(this),
149148
emit: this.#emit.bind(this),

0 commit comments

Comments
 (0)