atomic-sleep
atomic-sleep copied to clipboard
Minification breaks module exports
The minifier moves the exports outside of the two if
statements as it is considered canonical to have only one module.exports
.
Steps to reproduce:
- Install package into some project, and call exported method
- Run
npx -y minify-all-cli -s node_modules -d node_modules_minified && rm -rf node_modules && cp -r node_modules_minified node_modules
This breaks calls to the module with a reference error. PR 1 would fix this
Hi! As the author seem to have abandoned the current project, I replicated it and credited him in the README.
I also fixed the mentioned issue.
Waiting for your feedback at Event Loop Sleep