Open wyyr opened 9 months ago
Hey, I'm done searching for firestore migration, and just found this great tools. But seems only support for CommonJS.
Can I use ES6 module import ? because I faced this error when i'm using ES6 Module import.
v0.0.1__foods.js
import * as fs from 'fs'; import * as path from 'path'; async function migrate({ firestore, FieldValue }) { const foods = JSON.parse(fs.readFileSync(path.resolve('src/seeds/foods.json'))); foods.forEach(async (item) => { await firestore.collection('foods').doc(item.id).set(item); }); } export default migrate;
Hey, I'm done searching for firestore migration, and just found this great tools. But seems only support for CommonJS.
Can I use ES6 module import ? because I faced this error when i'm using ES6 Module import.
v0.0.1__foods.js