-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var idle is minified to var $ witch breaks a legacy Zepto(jQuery alternative) implementation #33
Comments
Hey! Could you confirm how you're loading Async Alpine? I'd much prefer to instead work out if we can scope and isolate Async Alpine to not leak and interact with any external scripts, instead of manipulating the minified output. |
Hey, at the moment I am loading it with a <script> tag in the page head <script defer src="https://www.myfantasydomain.com/assets/js/vendor/async-alpine/dist/async-alpine.script.js"></script>I have a local copy of async-alpine.script.js not using the cdn |
Okay great, thanks for that. Due to workload I won't be able to take a look into this right now, but should be in the next couple of weeks. In the meantime you could consider manually changing the variable name or adding |
Hey Accudio, |
I've run into the same problem while managing an older site. I gotta say, it's a bit of a tricky issue because esbuild uses What do you think, Accudio? You can check out my commit attempt here: I think we can use IIFE to isolate, but I decided to switch to npm+esm for better future. |
@iniznet That looks good and I'm happy to switch to using default exports. Although that fixes this particular problem of That should be a simple change to line 12 of Thank you! |
* feat: alias function module loading * Enable multiple [name] replacements in AsyncAlpine.alias() (#34) * Use IIFE format for the CDN build. Fixes #33 * Minor formatting tweaks * Bumped version to 1.2.0 --------- Co-authored-by: Jon Whitter <[email protected]> Co-authored-by: Andy Dennis <[email protected]> Co-authored-by: Yusuf Fauzan <[email protected]>
Hi Accudio,
I use async-alpine on my web project that uses ZeptoJS(jQuery alternative) for a legacy feature. As Zepto and jQuery use $ as the main identifier my old code stops working, because your idle function is called $ in the minified version since async-alpine v1.1.0.
Is it possible to minify to another name.
Thanks for the great package and your help
Vasco
The text was updated successfully, but these errors were encountered: