ljosberinn/eslint-config-galex

View on GitHub
scripts/monkey-patch-default-export.js

Summary

Maintainability
A
0 mins
Test Coverage
const { readFileSync, writeFileSync } = require('fs');
const { resolve } = require('path');

const file = resolve('./dist/index.js');

writeFileSync(
  file,
  readFileSync(file, 'utf-8').replace('exports.default =', 'module.exports =')
);