t4t5 / sweetalert

A beautiful replacement for JavaScript's "alert"
https://sweetalert.js.org
MIT License
22.39k stars 2.84k forks source link

Break builds 'exports is not defined' #883

Open apuntovanini opened 5 years ago

apuntovanini commented 5 years ago

Hi, I think there's some problem in how with-react and transformer packages create their dist versions. I'm not sure, and I find it difficult to replicate in sandbox, but it says "exports is not defined" at line 19 of dist/transformer. May it be necessary to upgrade to latest rollup?

apuntovanini commented 5 years ago

Ok, I found a difference with rollup 0.67, but can't say how it breaks minification by terser (it worked with uglify-js/es), but this is the only difference I can spot so far

last lines with newer rollup

exports.default = index;
exports.bindActions = bindActions;

with current one

exports['default'] = index;
exports.bindActions = bindActions;

But in reality these two are equivalent. I’ll investigate more later tonight or close it, thanks

apuntovanini commented 5 years ago

I tried to build my app without @sweetalert/with-react, using import swal from 'sweetalert' and things work now. There has to be a problem with with-react and transformer packages, but I still struggle to find it. Any ideas @t4t5 ? It's not a problem related to minification Thanks

fxckdead commented 4 years ago

+1 to this, still happening