Skip to content

Commit 7ca4c59

Browse files
committed
feat(uts2js): 启用运行、发行的编译缓存
1 parent 2d3d54a commit 7ca4c59

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

packages/uni-app-uts/src/plugins/ios/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as path from 'path'
12
import {
23
UNI_EASYCOM_EXCLUDE,
34
parseUniExtApiNamespacesOnce,
@@ -35,6 +36,11 @@ export function init() {
3536
resolveUTSCompiler().uts2js({
3637
inputDir: process.env.UNI_INPUT_DIR,
3738
version: process.env.UNI_COMPILER_VERSION,
39+
cacheRoot: path.resolve(
40+
process.env.UNI_APP_X_CACHE_DIR ||
41+
path.resolve(process.env.UNI_OUTPUT_DIR, '../.app-ios'),
42+
'.uts2js/cache'
43+
),
3844
modules: {
3945
vueCompilerDom,
4046
uniCliShared,

packages/uni-h5-vite/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default [
3333
cacheRoot: path.resolve(
3434
process.env.UNI_APP_X_CACHE_DIR ||
3535
path.resolve(process.env.UNI_OUTPUT_DIR, '../.web'),
36-
'.uts/cache'
36+
'.uts2js/cache'
3737
),
3838
modules: {
3939
vueCompilerDom,

packages/uni-uts-v1/lib/javascript/dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/uni-uts-v1/lib/kotlin/dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/uni-uts-v1/src/tsc/javascript/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export const uts2js: uts2js = (options) => {
1414
// TODO 目前开发阶段禁用缓存,禁用check
1515
extend(options, {
1616
cwd: inputDir,
17-
clean: true,
1817
check: process.env.UNI_UTS_PLATFORM === 'web',
1918
tsconfigOverride: {
2019
compilerOptions: {

0 commit comments

Comments
 (0)