Signed-off-by: puyajun <puyajun@huawei.com>
This commit is contained in:
puyajun
2022-03-21 21:11:52 +08:00
parent a82b871262
commit 6e6899d4db
2 changed files with 11 additions and 3 deletions
+2
View File
@@ -56,6 +56,8 @@ function initProjectConfig(projectConfig) {
projectConfig.aceSuperVisualPath = projectConfig.aceSuperVisualPath ||
process.env.aceSuperVisualPath
projectConfig.aceBuildJson = projectConfig.aceBuildJson || process.env.aceBuildJson;
projectConfig.cachePath = projectConfig.cachePath || process.env.cachePath ||
path.resolve(__dirname, 'node_modules/.cache');
}
function loadEntryObj(projectConfig) {
+9 -3
View File
@@ -39,9 +39,6 @@ function initConfig(config) {
const projectPath = path.resolve(projectConfig.projectPath);
Object.assign(config, {
entry: projectConfig.entryObj,
cache: {
type: "filesystem"
},
watch: watchMode,
watchOptions: {
aggregateTimeout: 10,
@@ -116,6 +113,12 @@ function initConfig(config) {
new ResultStates()
]
});
if (!/ets_loader_ark$/.test(__dirname)) {
config.cache = {
type: "filesystem",
cacheDirectory: path.resolve(projectConfig.cachePath, '.ets_cache')
};
}
}
function setProjectConfig(envArgs) {
@@ -138,6 +141,9 @@ function setProjectConfig(envArgs) {
if (envArgs.aceModuleJsonPath) {
projectConfig.aceModuleJsonPath = envArgs.aceModuleJsonPath;
}
if (envArgs.cachePath) {
projectConfig.cachePath = envArgs.cachePath;
}
}
function setReleaseConfig(config) {