mirror of
https://github.com/konvajs/konva.git
synced 2026-01-22 21:02:26 +08:00
migrate back to commonjs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user