vite-plugin-qingkuai 1.0.27 → 1.0.29
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/index.cjs +14 -8
- package/dist/index.js +15 -9
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -163,7 +163,8 @@ function qingkuai(options = {}) {
|
|
|
163
163
|
isDev = env.command === "serve";
|
|
164
164
|
return {
|
|
165
165
|
define: {
|
|
166
|
-
|
|
166
|
+
__qk__dev: isDev,
|
|
167
|
+
__qk__max_schedule_depth: options.maxScheduleDepth
|
|
167
168
|
}
|
|
168
169
|
};
|
|
169
170
|
},
|
|
@@ -519,18 +520,23 @@ Caused by: "${fileId}".`;
|
|
|
519
520
|
interpretiveComments: isUndefined(qingkuaiConfig.interpretiveComments) ? isDev : !!qingkuaiConfig.interpretiveComments,
|
|
520
521
|
allowConstReactive: qingkuaiConfig.allowConstReactive !== false,
|
|
521
522
|
requireReactivityMark: qingkuaiConfig.requireReactivityMark === true,
|
|
522
|
-
reactivityMode: qingkuaiConfig.reactivityMode === "shallow" ?
|
|
523
|
+
reactivityMode: qingkuaiConfig.reactivityMode === "shallow" ? compiler.ReactivityMode.Shallow : compiler.ReactivityMode.Reactive
|
|
523
524
|
};
|
|
524
525
|
switch (qingkuaiConfig.whitespace) {
|
|
525
|
-
case "trim":
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
526
|
+
case "trim": {
|
|
527
|
+
ret.whitespace = compiler.WhitespaceMode.Trim;
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
case "collapse": {
|
|
531
|
+
ret.whitespace = compiler.WhitespaceMode.Collapse;
|
|
532
|
+
break;
|
|
533
|
+
}
|
|
534
|
+
case "preserve": {
|
|
535
|
+
ret.whitespace = compiler.WhitespaceMode.Preserve;
|
|
530
536
|
break;
|
|
531
537
|
}
|
|
532
538
|
default: {
|
|
533
|
-
ret.whitespace =
|
|
539
|
+
ret.whitespace = compiler.WhitespaceMode.TrimCollapse;
|
|
534
540
|
break;
|
|
535
541
|
}
|
|
536
542
|
}
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { LinesAndColumns } from 'lines-and-columns';
|
|
|
7
7
|
import { decode, encode } from '@jridgewell/sourcemap-codec';
|
|
8
8
|
import postcss from 'postcss';
|
|
9
9
|
import selectorParser from 'postcss-selector-parser';
|
|
10
|
-
import { util, compile, isCompileError } from 'qingkuai/compiler';
|
|
10
|
+
import { util, compile, isCompileError, ReactivityMode, WhitespaceMode } from 'qingkuai/compiler';
|
|
11
11
|
import { SourceMapConsumer } from 'source-map-js';
|
|
12
12
|
|
|
13
13
|
async function attachScopeForStyleSelectors(code, hash, sourceFile, map) {
|
|
@@ -142,7 +142,8 @@ function qingkuai(options = {}) {
|
|
|
142
142
|
isDev = env.command === "serve";
|
|
143
143
|
return {
|
|
144
144
|
define: {
|
|
145
|
-
|
|
145
|
+
__qk__dev: isDev,
|
|
146
|
+
__qk__max_schedule_depth: options.maxScheduleDepth
|
|
146
147
|
}
|
|
147
148
|
};
|
|
148
149
|
},
|
|
@@ -498,18 +499,23 @@ Caused by: "${fileId}".`;
|
|
|
498
499
|
interpretiveComments: isUndefined(qingkuaiConfig.interpretiveComments) ? isDev : !!qingkuaiConfig.interpretiveComments,
|
|
499
500
|
allowConstReactive: qingkuaiConfig.allowConstReactive !== false,
|
|
500
501
|
requireReactivityMark: qingkuaiConfig.requireReactivityMark === true,
|
|
501
|
-
reactivityMode: qingkuaiConfig.reactivityMode === "shallow" ?
|
|
502
|
+
reactivityMode: qingkuaiConfig.reactivityMode === "shallow" ? ReactivityMode.Shallow : ReactivityMode.Reactive
|
|
502
503
|
};
|
|
503
504
|
switch (qingkuaiConfig.whitespace) {
|
|
504
|
-
case "trim":
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
505
|
+
case "trim": {
|
|
506
|
+
ret.whitespace = WhitespaceMode.Trim;
|
|
507
|
+
break;
|
|
508
|
+
}
|
|
509
|
+
case "collapse": {
|
|
510
|
+
ret.whitespace = WhitespaceMode.Collapse;
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
case "preserve": {
|
|
514
|
+
ret.whitespace = WhitespaceMode.Preserve;
|
|
509
515
|
break;
|
|
510
516
|
}
|
|
511
517
|
default: {
|
|
512
|
-
ret.whitespace =
|
|
518
|
+
ret.whitespace = WhitespaceMode.TrimCollapse;
|
|
513
519
|
break;
|
|
514
520
|
}
|
|
515
521
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"author": "mlgq",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.29",
|
|
7
7
|
"packageManager": "pnpm@9.9.0",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"fs-extra": "^11.3.0",
|
|
33
33
|
"husky": "^9.1.7",
|
|
34
34
|
"lint-staged": "^17.3.0",
|
|
35
|
-
"qingkuai": "^1.0.
|
|
35
|
+
"qingkuai": "^1.0.104",
|
|
36
36
|
"rimraf": "^6.0.1",
|
|
37
37
|
"rollup": "^4.38.0",
|
|
38
38
|
"rollup-plugin-dts": "^6.2.1",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"vite": "8.0.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"qingkuai": ">=1.0.
|
|
43
|
+
"qingkuai": ">=1.0.104",
|
|
44
44
|
"vite": ">=6.2.4 <9"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|