mirror of
https://github.com/coaidev/coai.git
synced 2025-05-28 17:30:15 +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",
|
||||
apply: "build",
|
||||
configResolved(config) {
|
||||
const source = path.resolve(config.root, "src/resources/i18n");
|
||||
try {
|
||||
const source = path.resolve(config.root, "src/resources/i18n");
|
||||
|
||||
const files = fs.readdirSync(source);
|
||||
console.log(files);
|
||||
const files = fs.readdirSync(source);
|
||||
console.log(files);
|
||||
} catch (e) {
|
||||
console.debug(`error during translation: ${e}`);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user