!129 fix css import error bug

Merge pull request !129 from 卡哥/master
This commit is contained in:
openharmony_ci 2022-11-23 04:00:41 +00:00 committed by Gitee
commit aed118ea6f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -587,6 +587,8 @@ function addPreviewCSS(importPath, resourcePath) {
content[importPath].push(...content[resourcePath]);
content[importPath] = lodash.uniqWith(content[importPath], lodash.isEqual);
}
content["atime"] = content["atime"] || {};
content["atime"][importPath] = fs.statSync(importPath).atime.toString();
fs.writeFileSync(process.env.watchCSSFiles, JSON.stringify(content, null, 2));
}
}