Closed ryanflorence closed 2 years ago
I verified manually with this:
npm run build
mkdir ~/Desktop/test
touch ~/Desktop/test/go.mjs
cp -R build ~/Desktop/test/node_modules
Then running this script works as expected:
import { createMemoryHistory } from 'history';
console.log(createMemoryHistory);
Seems like a smart tradeoff to me as well.
Does this mean the dependency can also be removed in package.json? I didn't see another usage.
Removing closure compiiler fixes the problem. The build is now much faster and the resulting file size difference is marginal.
The UMD production file size went from 6,105 bytes with closure compiler to 6,164 without it. We can afford 59 bytes to get ESM support.