vite 8.2.1 → 8.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/bundledDevClient.mjs +85 -29
- package/dist/client/client.mjs +20 -14
- package/dist/node/chunks/build.js +70 -64
- package/dist/node/chunks/dist.js +36 -29
- package/dist/node/chunks/node.js +556 -457
- package/dist/node/chunks/postcss-import.js +23 -25
- package/dist/node/index.d.ts +58 -55
- package/dist/node/module-runner.d.ts +13 -13
- package/dist/node/module-runner.js +24 -19
- package/package.json +14 -14
package/dist/node/chunks/dist.js
CHANGED
|
@@ -1650,13 +1650,15 @@ var Tokenizer = class {
|
|
|
1650
1650
|
this.active = false;
|
|
1651
1651
|
}
|
|
1652
1652
|
_appendCharToCurrentCharacterToken(type, ch) {
|
|
1653
|
-
if (this.currentCharacterToken)
|
|
1654
|
-
this.currentCharacterToken.
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1653
|
+
if (this.currentCharacterToken) {
|
|
1654
|
+
if (this.currentCharacterToken.type === type) {
|
|
1655
|
+
this.currentCharacterToken.chars += ch;
|
|
1656
|
+
return;
|
|
1657
|
+
} else {
|
|
1658
|
+
this.currentLocation = this.getCurrentLocation(0);
|
|
1659
|
+
this._emitCurrentCharacterToken(this.currentLocation);
|
|
1660
|
+
this.preprocessor.dropParsedChunk();
|
|
1661
|
+
}
|
|
1660
1662
|
}
|
|
1661
1663
|
this._createCharacterToken(type, ch);
|
|
1662
1664
|
}
|
|
@@ -2632,14 +2634,15 @@ var Tokenizer = class {
|
|
|
2632
2634
|
} else if (this._consumeSequenceIfMatch(SEQUENCES.DOCTYPE, false)) {
|
|
2633
2635
|
this.currentLocation = this.getCurrentLocation(SEQUENCES.DOCTYPE.length + 1);
|
|
2634
2636
|
this.state = State.DOCTYPE;
|
|
2635
|
-
} else if (this._consumeSequenceIfMatch(SEQUENCES.CDATA_START, true))
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2637
|
+
} else if (this._consumeSequenceIfMatch(SEQUENCES.CDATA_START, true)) {
|
|
2638
|
+
if (this.inForeignNode) this.state = State.CDATA_SECTION;
|
|
2639
|
+
else {
|
|
2640
|
+
this._err(ERR.cdataInHtmlContent);
|
|
2641
|
+
this._createCommentToken(SEQUENCES.CDATA_START.length + 1);
|
|
2642
|
+
this.currentToken.data = "[CDATA[";
|
|
2643
|
+
this.state = State.BOGUS_COMMENT;
|
|
2644
|
+
}
|
|
2645
|
+
} else if (!this._ensureHibernation()) {
|
|
2643
2646
|
this._err(ERR.incorrectlyOpenedComment);
|
|
2644
2647
|
this._createCommentToken(2);
|
|
2645
2648
|
this.state = State.BOGUS_COMMENT;
|
|
@@ -3308,13 +3311,15 @@ var Tokenizer = class {
|
|
|
3308
3311
|
}
|
|
3309
3312
|
_stateCharacterReference() {
|
|
3310
3313
|
let length = this.entityDecoder.write(this.preprocessor.html, this.preprocessor.pos);
|
|
3311
|
-
if (length < 0)
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3314
|
+
if (length < 0) {
|
|
3315
|
+
if (this.preprocessor.lastChunkWritten) length = this.entityDecoder.end();
|
|
3316
|
+
else {
|
|
3317
|
+
this.active = false;
|
|
3318
|
+
this.preprocessor.pos = this.preprocessor.html.length - 1;
|
|
3319
|
+
this.consumedAfterSnapshot = 0;
|
|
3320
|
+
this.preprocessor.endOfChunkHit = true;
|
|
3321
|
+
return;
|
|
3322
|
+
}
|
|
3318
3323
|
}
|
|
3319
3324
|
if (length === 0) {
|
|
3320
3325
|
this.preprocessor.pos = this.entityStartPos;
|
|
@@ -3510,13 +3515,15 @@ var OpenElementStack = class {
|
|
|
3510
3515
|
}
|
|
3511
3516
|
remove(element) {
|
|
3512
3517
|
const idx = this._indexOf(element);
|
|
3513
|
-
if (idx >= 0)
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3518
|
+
if (idx >= 0) {
|
|
3519
|
+
if (idx === this.stackTop) this.pop();
|
|
3520
|
+
else {
|
|
3521
|
+
this.items.splice(idx, 1);
|
|
3522
|
+
this.tagIDs.splice(idx, 1);
|
|
3523
|
+
this.stackTop--;
|
|
3524
|
+
this._updateCurrentElement();
|
|
3525
|
+
this.handler.onItemPop(element, false);
|
|
3526
|
+
}
|
|
3520
3527
|
}
|
|
3521
3528
|
}
|
|
3522
3529
|
tryPeekProperlyNestedBodyElement() {
|