fixed
This commit is contained in:
parent
6217b72652
commit
7ebe0c3eea
|
|
@ -311,7 +311,10 @@ export function packageJsonContent({
|
|||
"readable-stream": "3.6.2"
|
||||
},
|
||||
"_moduleAliases": {
|
||||
"@project": "./lib"
|
||||
"@project": "./lib",
|
||||
"@oak-general-business": "./node_modules/oak-general-business/lib",
|
||||
"@oak-frontend-base": "./node_modules/oak-frontend-base/lib",
|
||||
"@oak-app-domain": "./lib/oak-app-domain"
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,11 @@ const restart = async () => {
|
|||
// 清空lib以下目录的缓存
|
||||
// 删除所有模块的缓存
|
||||
Object.keys(require.cache).forEach(function (key) {
|
||||
if (key.includes('node_modules')) {
|
||||
return;
|
||||
}
|
||||
if (key.includes('lib')) {
|
||||
console.log('delete module cache:', key);
|
||||
delete require.cache[key];
|
||||
}
|
||||
});
|
||||
|
|
@ -181,7 +185,8 @@ const onChangeDebounced = _.debounce(async (path, type) => {
|
|||
const diagnostics = ts.getPreEmitDiagnostics(program, sourceFile);
|
||||
if (diagnostics.length) {
|
||||
const syntaxErrors = diagnostics.filter(
|
||||
(diagnostic) => diagnostic.category === ts.DiagnosticCategory.Error
|
||||
(diagnostic) =>
|
||||
diagnostic.category === ts.DiagnosticCategory.Error
|
||||
);
|
||||
|
||||
if (syntaxErrors.length) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue