@vxrn/compiler 1.27.0 → 1.27.1-1789509973946
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/cjs/cache.cjs +112 -109
- package/dist/cjs/configure.cjs +26 -28
- package/dist/cjs/constants.cjs +56 -60
- package/dist/cjs/index.cjs +420 -442
- package/dist/cjs/reactNativeCodegen.cjs +105 -114
- package/dist/cjs/reactNativeViewConfig.cjs +362 -381
- package/dist/cjs/refresh-runtime.cjs +390 -397
- package/dist/cjs/transformBabel.cjs +273 -259
- package/dist/cjs/transformHermesAsync.cjs +36 -47
- package/dist/cjs/transformHermesLoops.cjs +279 -281
- package/dist/cjs/transformSWC.cjs +183 -200
- package/dist/cjs/transformWorklets.cjs +107 -95
- package/dist/cjs/types.cjs +9 -11
- package/dist/cjs/worklets/autoworklet.cjs +277 -222
- package/dist/cjs/worklets/globals.cjs +124 -60
- package/dist/cjs/worklets/hash.cjs +23 -27
- package/dist/cjs/worklets/scope.cjs +338 -359
- package/dist/cjs/worklets/serialize.cjs +73 -75
- package/dist/cjs/worklets/transform.cjs +217 -222
- package/dist/cjs/worklets/types.cjs +9 -11
- package/dist/esm/cache.mjs +96 -89
- package/dist/esm/cache.mjs.map +1 -1
- package/dist/esm/configure.mjs +11 -10
- package/dist/esm/configure.mjs.map +1 -1
- package/dist/esm/constants.mjs +41 -41
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/index.js +417 -424
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +417 -424
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/reactNativeCodegen.mjs +90 -88
- package/dist/esm/reactNativeCodegen.mjs.map +1 -1
- package/dist/esm/reactNativeViewConfig.mjs +347 -362
- package/dist/esm/reactNativeViewConfig.mjs.map +1 -1
- package/dist/esm/refresh-runtime.mjs +372 -376
- package/dist/esm/refresh-runtime.mjs.map +1 -1
- package/dist/esm/transformBabel.mjs +255 -233
- package/dist/esm/transformBabel.mjs.map +1 -1
- package/dist/esm/transformHermesAsync.mjs +20 -21
- package/dist/esm/transformHermesAsync.mjs.map +1 -1
- package/dist/esm/transformHermesLoops.mjs +264 -255
- package/dist/esm/transformHermesLoops.mjs.map +1 -1
- package/dist/esm/transformSWC.mjs +163 -171
- package/dist/esm/transformSWC.mjs.map +1 -1
- package/dist/esm/transformWorklets.mjs +89 -69
- package/dist/esm/transformWorklets.mjs.map +1 -1
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/worklets/autoworklet.mjs +258 -200
- package/dist/esm/worklets/autoworklet.mjs.map +1 -1
- package/dist/esm/worklets/globals.mjs +109 -42
- package/dist/esm/worklets/globals.mjs.map +1 -1
- package/dist/esm/worklets/hash.mjs +10 -9
- package/dist/esm/worklets/hash.mjs.map +1 -1
- package/dist/esm/worklets/scope.mjs +325 -341
- package/dist/esm/worklets/scope.mjs.map +1 -1
- package/dist/esm/worklets/serialize.mjs +60 -58
- package/dist/esm/worklets/serialize.mjs.map +1 -1
- package/dist/esm/worklets/transform.mjs +201 -197
- package/dist/esm/worklets/transform.mjs.map +1 -1
- package/dist/esm/worklets/types.mjs +0 -2
- package/package.json +7 -6
- package/src/cache.ts +37 -7
- package/src/index.ts +7 -3
- package/src/transformBabel.test.ts +209 -9
- package/src/transformBabel.ts +41 -12
- package/src/transformWorklets.test.ts +7 -1
- package/types/cache.d.ts +2 -2
- package/types/cache.d.ts.map +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/transformBabel.d.ts +12 -0
- package/types/transformBabel.d.ts.map +1 -1
- package/types/transformSWC.d.ts +1 -4
- package/types/transformSWC.d.ts.map +1 -1
- package/dist/cjs/transformBabel.test.cjs +0 -448
- package/dist/cjs/transformHermesLoops.test.cjs +0 -257
- package/dist/cjs/transformSWC.test.cjs +0 -117
- package/dist/cjs/transformWorklets.test.cjs +0 -604
- package/dist/esm/transformBabel.test.mjs +0 -425
- package/dist/esm/transformBabel.test.mjs.map +0 -1
- package/dist/esm/transformHermesLoops.test.mjs +0 -234
- package/dist/esm/transformHermesLoops.test.mjs.map +0 -1
- package/dist/esm/transformSWC.test.mjs +0 -118
- package/dist/esm/transformSWC.test.mjs.map +0 -1
- package/dist/esm/transformWorklets.test.mjs +0 -581
- package/dist/esm/transformWorklets.test.mjs.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/worklets/types.mjs.map +0 -1
- package/types/transformBabel.test.d.ts +0 -2
- package/types/transformBabel.test.d.ts.map +0 -1
- package/types/transformHermesLoops.test.d.ts +0 -2
- package/types/transformHermesLoops.test.d.ts.map +0 -1
- package/types/transformSWC.test.d.ts +0 -2
- package/types/transformSWC.test.d.ts.map +0 -1
- package/types/transformWorklets.test.d.ts +0 -2
- package/types/transformWorklets.test.d.ts.map +0 -1
package/dist/cjs/cache.cjs
CHANGED
|
@@ -3,30 +3,28 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var cache_exports = {};
|
|
24
22
|
__export(cache_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
clearTransformCache: () => clearTransformCache,
|
|
24
|
+
getCacheStats: () => getCacheStats,
|
|
25
|
+
getCachedTransform: () => getCachedTransform,
|
|
26
|
+
logCacheStats: () => logCacheStats,
|
|
27
|
+
setCachedTransform: () => setCachedTransform
|
|
30
28
|
});
|
|
31
29
|
module.exports = __toCommonJS(cache_exports);
|
|
32
30
|
var import_node_crypto = require("node:crypto");
|
|
@@ -34,108 +32,113 @@ var import_node_fs = require("node:fs");
|
|
|
34
32
|
var import_node_path = require("node:path");
|
|
35
33
|
var import_configure = require("./configure.cjs");
|
|
36
34
|
const stats = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
hits: 0,
|
|
36
|
+
misses: 0,
|
|
37
|
+
writes: 0,
|
|
38
|
+
errors: 0
|
|
41
39
|
};
|
|
42
40
|
function getCacheDir() {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
return cacheDir;
|
|
41
|
+
const cacheDir = (0, import_node_path.join)(process.cwd(), "node_modules", ".vxrn", "compiler-cache");
|
|
42
|
+
if (!(0, import_node_fs.existsSync)(cacheDir)) {
|
|
43
|
+
(0, import_node_fs.mkdirSync)(cacheDir, { recursive: true });
|
|
44
|
+
}
|
|
45
|
+
return cacheDir;
|
|
50
46
|
}
|
|
51
|
-
function getConfigFingerprint() {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
})).digest("hex").slice(0, 8);
|
|
47
|
+
function getConfigFingerprint(userBabelConfigPath) {
|
|
48
|
+
return (0, import_node_crypto.createHash)("sha1").update(JSON.stringify({
|
|
49
|
+
compiler: import_configure.configuration.enableCompiler,
|
|
50
|
+
reanimated: import_configure.configuration.enableReanimated,
|
|
51
|
+
nativeWorklets: (0, import_configure.isNativeWorkletsEnabled)(),
|
|
52
|
+
nativewind: import_configure.configuration.enableNativewind,
|
|
53
|
+
nativeCSS: import_configure.configuration.enableNativeCSS,
|
|
54
|
+
babelConfig: getBabelConfigIdentity(userBabelConfigPath),
|
|
55
|
+
engine: "oxc-worklets-hermes-async"
|
|
56
|
+
})).digest("hex").slice(0, 8);
|
|
62
57
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
function getBabelConfigIdentity(configPath) {
|
|
59
|
+
if (!configPath) return null;
|
|
60
|
+
try {
|
|
61
|
+
const mtime = (0, import_node_fs.statSync)(configPath).mtimeMs;
|
|
62
|
+
const hash = (0, import_node_crypto.createHash)("sha1").update((0, import_node_fs.readFileSync)(configPath)).digest("hex").slice(0, 16);
|
|
63
|
+
return `${configPath}:${mtime}:${hash}`;
|
|
64
|
+
} catch {
|
|
65
|
+
return configPath;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function getCacheKey(filePath, environment, userBabelConfigPath) {
|
|
69
|
+
const hash = (0, import_node_crypto.createHash)("sha1").update(`${environment}:${filePath}:${getConfigFingerprint(userBabelConfigPath)}`).digest("hex");
|
|
70
|
+
return hash;
|
|
66
71
|
}
|
|
67
72
|
function getContentHash(code) {
|
|
68
|
-
|
|
73
|
+
return (0, import_node_crypto.createHash)("sha1").update(code).digest("hex").slice(0, 16);
|
|
69
74
|
}
|
|
70
|
-
function getCachedTransform(filePath, code, environment) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
75
|
+
function getCachedTransform(filePath, code, environment, userBabelConfigPath) {
|
|
76
|
+
try {
|
|
77
|
+
const cleanPath = filePath.startsWith("\0") ? filePath.slice(1) : filePath;
|
|
78
|
+
const cacheDir = getCacheDir();
|
|
79
|
+
const cacheKey = getCacheKey(cleanPath, environment, userBabelConfigPath);
|
|
80
|
+
const cachePath = (0, import_node_path.join)(cacheDir, `${cacheKey}.json`);
|
|
81
|
+
if (!(0, import_node_fs.existsSync)(cachePath)) {
|
|
82
|
+
stats.misses++;
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
const cached = JSON.parse((0, import_node_fs.readFileSync)(cachePath, "utf-8"));
|
|
86
|
+
const currentMtime = (0, import_node_fs.statSync)(cleanPath).mtimeMs;
|
|
87
|
+
if (cached.mtime !== currentMtime) {
|
|
88
|
+
stats.misses++;
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
const currentHash = getContentHash(code);
|
|
92
|
+
if (cached.hash !== currentHash) {
|
|
93
|
+
stats.misses++;
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
stats.hits++;
|
|
97
|
+
return {
|
|
98
|
+
code: cached.code,
|
|
99
|
+
map: cached.map
|
|
100
|
+
};
|
|
101
|
+
} catch (err) {
|
|
102
|
+
stats.misses++;
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
100
105
|
}
|
|
101
|
-
function setCachedTransform(filePath, code, result, environment) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
106
|
+
function setCachedTransform(filePath, code, result, environment, userBabelConfigPath) {
|
|
107
|
+
try {
|
|
108
|
+
const cleanPath = filePath.startsWith("\0") ? filePath.slice(1) : filePath;
|
|
109
|
+
const cacheDir = getCacheDir();
|
|
110
|
+
const cacheKey = getCacheKey(cleanPath, environment, userBabelConfigPath);
|
|
111
|
+
const cachePath = (0, import_node_path.join)(cacheDir, `${cacheKey}.json`);
|
|
112
|
+
const mtime = (0, import_node_fs.statSync)(cleanPath).mtimeMs;
|
|
113
|
+
const hash = getContentHash(code);
|
|
114
|
+
const entry = {
|
|
115
|
+
mtime,
|
|
116
|
+
hash,
|
|
117
|
+
code: result.code,
|
|
118
|
+
map: result.map
|
|
119
|
+
};
|
|
120
|
+
(0, import_node_fs.writeFileSync)(cachePath, JSON.stringify(entry), "utf-8");
|
|
121
|
+
stats.writes++;
|
|
122
|
+
} catch (err) {
|
|
123
|
+
console.warn(`[cache] Failed to write cache for ${filePath}:`, err);
|
|
124
|
+
}
|
|
120
125
|
}
|
|
121
126
|
function clearTransformCache() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
(0, import_node_fs.rmSync)(getCacheDir(), {
|
|
128
|
+
recursive: true,
|
|
129
|
+
force: true
|
|
130
|
+
});
|
|
126
131
|
}
|
|
127
132
|
function getCacheStats() {
|
|
128
|
-
|
|
129
|
-
...stats
|
|
130
|
-
};
|
|
133
|
+
return { ...stats };
|
|
131
134
|
}
|
|
132
135
|
function logCacheStats() {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
if (!process.env.DEBUG_COMPILER_PERF) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const total = stats.hits + stats.misses;
|
|
140
|
+
if (total === 0) return;
|
|
141
|
+
const hitRate = (stats.hits / total * 100).toFixed(1);
|
|
142
|
+
console.info(`
|
|
140
143
|
\u{1F4BE} [Cache Stats] ${stats.hits} hits / ${stats.misses} misses (${hitRate}% hit rate), ${stats.writes} writes`);
|
|
141
|
-
}
|
|
144
|
+
}
|
package/dist/cjs/configure.cjs
CHANGED
|
@@ -3,43 +3,41 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var configure_exports = {};
|
|
24
22
|
__export(configure_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
configuration: () => configuration,
|
|
24
|
+
configureVXRNCompilerPlugin: () => configureVXRNCompilerPlugin,
|
|
25
|
+
isNativeWorkletsEnabled: () => isNativeWorkletsEnabled
|
|
28
26
|
});
|
|
29
27
|
module.exports = __toCommonJS(configure_exports);
|
|
30
28
|
const configuration = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
enableNativewind: false,
|
|
30
|
+
enableReanimated: false,
|
|
31
|
+
enableNativeWorklets: true,
|
|
32
|
+
enableCompiler: false,
|
|
33
|
+
enableNativeCSS: false
|
|
36
34
|
};
|
|
37
35
|
function isNativeWorkletsEnabled() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
if (process.env.VXRN_NATIVE_WORKLETS === "false" || process.env.VXRN_NATIVE_WORKLETS === "0") {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
return configuration.enableNativeWorklets !== false;
|
|
42
40
|
}
|
|
43
41
|
function configureVXRNCompilerPlugin(_) {
|
|
44
|
-
|
|
45
|
-
}
|
|
42
|
+
Object.assign(configuration, _);
|
|
43
|
+
}
|
package/dist/cjs/constants.cjs
CHANGED
|
@@ -3,75 +3,71 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var constants_exports = {};
|
|
24
22
|
__export(constants_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
asyncGeneratorRegex: () => asyncGeneratorRegex,
|
|
24
|
+
debug: () => debug,
|
|
25
|
+
parsers: () => parsers,
|
|
26
|
+
runtimePublicPath: () => runtimePublicPath,
|
|
27
|
+
validParsers: () => validParsers
|
|
30
28
|
});
|
|
31
29
|
module.exports = __toCommonJS(constants_exports);
|
|
32
30
|
var import_utils = require("@vxrn/utils");
|
|
33
|
-
const {
|
|
34
|
-
debug
|
|
35
|
-
} = (0, import_utils.createDebugger)("vxrn:compiler-plugin");
|
|
31
|
+
const { debug } = (0, import_utils.createDebugger)("vxrn:compiler-plugin");
|
|
36
32
|
const runtimePublicPath = "/@react-refresh";
|
|
37
33
|
const asyncGeneratorRegex = /(async \*|async function\*|for await)/;
|
|
38
34
|
const parsers = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
35
|
+
".tsx": {
|
|
36
|
+
syntax: "typescript",
|
|
37
|
+
tsx: true,
|
|
38
|
+
decorators: true
|
|
39
|
+
},
|
|
40
|
+
".ts": {
|
|
41
|
+
syntax: "typescript",
|
|
42
|
+
tsx: false,
|
|
43
|
+
decorators: true
|
|
44
|
+
},
|
|
45
|
+
".jsx": {
|
|
46
|
+
syntax: "ecmascript",
|
|
47
|
+
jsx: true,
|
|
48
|
+
importAttributes: true,
|
|
49
|
+
explicitResourceManagement: true
|
|
50
|
+
},
|
|
51
|
+
".js": {
|
|
52
|
+
syntax: "ecmascript",
|
|
53
|
+
importAttributes: true,
|
|
54
|
+
explicitResourceManagement: true
|
|
55
|
+
},
|
|
56
|
+
".mjs": {
|
|
57
|
+
syntax: "ecmascript",
|
|
58
|
+
importAttributes: true,
|
|
59
|
+
explicitResourceManagement: true
|
|
60
|
+
},
|
|
61
|
+
".cjs": {
|
|
62
|
+
syntax: "ecmascript",
|
|
63
|
+
importAttributes: true,
|
|
64
|
+
explicitResourceManagement: true
|
|
65
|
+
},
|
|
66
|
+
".mdx": {
|
|
67
|
+
syntax: "ecmascript",
|
|
68
|
+
jsx: true,
|
|
69
|
+
importAttributes: true,
|
|
70
|
+
explicitResourceManagement: true
|
|
71
|
+
}
|
|
76
72
|
};
|
|
77
|
-
const validParsers = /* @__PURE__ */new Set([...Object.keys(parsers), ".css"]);
|
|
73
|
+
const validParsers = /* @__PURE__ */ new Set([...Object.keys(parsers), ".css"]);
|