Skip to content

Commit eccc8aa

Browse files
fix(ascf): 调整ascf.config.json的生成逻辑 (#18726)
Co-authored-by: vasily <[email protected]>
1 parent 7784ff0 commit eccc8aa

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/taro-platform-ascf/src/program.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ import { Template } from './template'
66
import type { IOptions } from './index'
77

88
const PACKAGE_NAME = '@tarojs/plugin-platform-ascf'
9+
const PROJECT_CONFIG_NAME = 'ascf.config.json'
910

1011
export default class AscfApp extends TaroPlatformBase {
1112
template: Template
1213
platform = 'ascf'
1314
globalObject = 'has'
14-
projectConfigJson: string = this.config.projectConfigName || 'ascf.config.json'
15+
projectConfigJson: string = this.config.projectConfigName || PROJECT_CONFIG_NAME
1516
runtimePath = `${PACKAGE_NAME}/dist/runtime`
1617
taroComponentsPath = `${PACKAGE_NAME}/dist/components-react`
1718
fileType = {
@@ -37,11 +38,18 @@ export default class AscfApp extends TaroPlatformBase {
3738
close () {
3839
this.modifyTemplate(pluginOptions)
3940
this.modifyWebpackConfig()
40-
this.generateProjectConfig('ascf.config.json', 'ascf.config.json')
4141
}
4242
})
4343
}
4444

45+
/**
46+
* ascf不需要生成project.config.json
47+
* 这里override,内部调用时直接生成ascf.config.json
48+
*/
49+
protected generateProjectConfig(src: string) {
50+
super.generateProjectConfig(src, PROJECT_CONFIG_NAME)
51+
}
52+
4553
/**
4654
* 增加组件或修改组件属性
4755
*/

0 commit comments

Comments
 (0)