Skip to content
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

Minify breaks AlpineJS #433

Open
BernhardBaumrock opened this issue Oct 9, 2024 · 0 comments
Open

Minify breaks AlpineJS #433

BernhardBaumrock opened this issue Oct 9, 2024 · 0 comments

Comments

@BernhardBaumrock
Copy link

BernhardBaumrock commented Oct 9, 2024

Hi and thanks for your great repo!

I'm trying to develop a module that merges and minifies all added assets. This worked great until I added alpine.min.js to the list of files that should be merged:

image

I get

Uncaught SyntaxError: Unexpected end of input (at xxx.min.js?m=1728459975:5:26045)

The problem in the file https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js is this line:

function _n(e,t,r){y(t,n=>E(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}

As you can see it also shouldn't remove spaces in that message!

What do you think of adding some kind of magic tags that prevent minify? Then I could, for example, wrap some added files that are already minified inside {nominify} my-alpine-content {/nominify}

Any help would be greatly appreciated! Thx in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant