Skip to content

Minify breaks AlpineJS #433

@BernhardBaumrock

Description

@BernhardBaumrock

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/alpinejs@3.x.x/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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions