Skip to content

import htmx-ext-see use vite inject directive not work. #3339

Open
@zw963

Description

@zw963
ssets       | node_modules/htmx-ext-sse/node_modules/htmx.org/dist/htmx.esm.js (854:13): Use of eval in "node_modules/htmx-ext-sse/node_modules/htmx.org/dist/htmx.esm.js" is strongly discouraged as it poses security risks and may cause issues with minification.
assets       | node_modules/htmx.org/dist/htmx.esm.js (868:13): Use of eval in "node_modules/htmx.org/dist/htmx.esm.js" is strongly discouraged as it poses security risks and may cause issues with minification.
assets       | src/js/app.js (2:9): Error when using sourcemap for reporting an error: Can't resolve original location of error.
assets       | ✓ 3 modules transformed.
assets       | src/js/app.js (2:9): "default" is not exported by "node_modules/htmx-ext-sse/dist/sse.esm.js", imported by "src/js/app.js".

Following is my config: (except htmx-ext-see, both others injected config work well in my app.js)

   plugins: [
            inject({
                exclude: ["src/**/*.scss", "src/**/*.css"],
                htmx: "htmx.org",
                htmx_sse: "htmx-ext-sse",
                _hyperscript: "hyperscript.org",
                copyCodeButton: "./copyCodeButton.js",
                stork: "./stork.js",
                mixManifest: "virtual:mix-manifest",
            }),
...
]

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions