migrate back to commonjs

This commit is contained in:
Anton Lavrenov
2023-04-13 23:27:56 -05:00
parent 9fd79e8642
commit 8e955f9dd5
11 changed files with 17707 additions and 17749 deletions

View File

@@ -33,3 +33,15 @@ files.then((filePaths) => {
});
});
});
const indexFiles = ['lib/index.js', 'lib/index-node.js', 'lib/Core.js'];
indexFiles.forEach((filepath) => {
fs.readFile(filepath, 'utf8', (err, text) => {
text = text.replace('exports.default =', 'module.exports =');
fs.writeFile(filepath, text, function (err) {
if (err) {
throw err;
}
});
});
});