feat(cli): support build watch mode

This commit is contained in:
陈嘉涵
2019-12-23 21:06:11 +08:00
parent 46d2b09447
commit ec1c87f8ae
6 changed files with 90 additions and 19 deletions

View File

@@ -77,7 +77,13 @@ function genEntry(params: {
});
}
export function genComponentStyle() {
export function genComponentStyle(
options: { cache: boolean } = { cache: true }
) {
if (!options.cache) {
delete require.cache[STYPE_DEPS_JSON_FILE];
}
const components = getComponents();
const baseFile = getCssBaseFile();