mirror of
https://github.com/coaidev/coai.git
synced 2025-06-08 06:40:32 +09:00
fix fs in cloud function env
This commit is contained in:
parent
a4e5204ce5
commit
a1b6af11fb
@ -7,10 +7,14 @@ export function createTranslationPlugin(): Plugin {
|
|||||||
name: "translate-plugin",
|
name: "translate-plugin",
|
||||||
apply: "build",
|
apply: "build",
|
||||||
configResolved(config) {
|
configResolved(config) {
|
||||||
|
try {
|
||||||
const source = path.resolve(config.root, "src/resources/i18n");
|
const source = path.resolve(config.root, "src/resources/i18n");
|
||||||
|
|
||||||
const files = fs.readdirSync(source);
|
const files = fs.readdirSync(source);
|
||||||
console.log(files);
|
console.log(files);
|
||||||
|
} catch (e) {
|
||||||
|
console.debug(`error during translation: ${e}`);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user