builders: fix webpack and improve yarn

This commit is contained in:
blattersturm
2020-11-01 12:48:04 +01:00
parent 99dac40452
commit 65fc598a5f
4 changed files with 2381 additions and 46 deletions

View File

@@ -12,7 +12,7 @@ const yarnBuildTask = {
const resourcePath = GetResourcePath(resourceName);
const packageJson = path.resolve(resourcePath, 'package.json');
const yarnLock = path.resolve(resourcePath, 'yarn.lock');
const yarnLock = path.resolve(resourcePath, '.yarn.installed');
const packageStat = fs.statSync(packageJson);
@@ -23,7 +23,7 @@ const yarnBuildTask = {
return true;
}
} catch (e) {
// no yarn.lock, but package.json - install time!
// no yarn.installed, but package.json - install time!
return true;
}
} catch (e) {
@@ -57,13 +57,8 @@ const yarnBuildTask = {
}
const resourcePath = GetResourcePath(resourceName);
const yarnLock = path.resolve(resourcePath, 'yarn.lock');
try {
fs.utimesSync(yarnLock, new Date(), new Date());
} catch (e) {
}
const yarnLock = path.resolve(resourcePath, '.yarn.installed');
fs.writeFileSync(yarnLock, '');
buildingInProgress = false;
currentBuildingModule = '';