atomic-sleep icon indicating copy to clipboard operation
atomic-sleep copied to clipboard

Minification breaks module exports

Open kaiwetlesen opened this issue 2 years ago • 1 comments

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

kaiwetlesen avatar Aug 30 '22 19:08 kaiwetlesen

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

Cadienvan avatar Jan 07 '23 15:01 Cadienvan