Tonkpils / ember-sweetalert

Ember CLI addon for SweetAlert2
MIT License
19 stars 10 forks source link

Not working in production build #17

Closed Fed03 closed 5 years ago

Fed03 commented 5 years ago

Hi, I used the unreleased 1.0 version of this addon throughout the whole development phase without any problem. Sadly, building for production make this not working.

The browser spits out the error t.default.mixin is not a function that I tracked down to this line https://github.com/Tonkpils/ember-sweetalert/blob/adc6999004f3ee3e3650a3ec63103069f1149fad/addon/services/swal.js#L16

Thinking that it might be a conflict with another addon I created an empty emper app with only ember-sweetalert installed https://github.com/Fed03/sweetalert-test

If you run ember s and ember s -prod you'll se the error. Let me know if I can help any further

lindyhopchris commented 5 years ago

Hi! Yes aware of this, see #14

If you enable the source maps as shown in that issue, does it solve your problem? Just need to check whether the issue you're encountering is a duplicate of that one or something else.

In relation to the source maps thing, I have no idea how to solve that at the moment so could do with some help if you're able to offer any.

Fed03 commented 5 years ago

I'll try and let you know. The only thing thant I think of is how we are loading sweetalert, that is through vendor shim. Maybe we could try using https://github.com/ef4/ember-auto-import

lindyhopchris commented 5 years ago

Yeah, good idea I'll give that a go.

Fed03 commented 5 years ago

Sent PR!

lindyhopchris commented 5 years ago

Thanks for the PR

Fed03 commented 5 years ago

Not at all! Happy to be helpful