DioxusLabs / DioxusLabs/dioxus

bundle does not support js module type

Open
#3,748 0 comments 0 reactions 0 assignees View on GitHub
bug manganis
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

**Steps To Reproduce**

Steps to reproduce the behavior:

- Create `/public/firebase.js`
```
import { initializeApp } from "https://www.gstatic.com/firebasejs/11.1.0/firebase-app.js";
import {
GoogleAuthProvider,
getAuth,
signInWithPopup,
signOut,
} from "https://www.gstatic.com/firebasejs/11.1.0/firebase-auth.js";

const firebase = {
initializeApp,
getAuth,
signInWithPopup,
signOut,
GoogleAuthProvider,
};

window.firebase = firebase;
```

- Import the module type or binding by wasm_bindgen
```
document::Script { r#type: "module", src: asset!("/public/firebase.js") }
```

- It makes empty `firebase-*.js` file.

**Expected behavior**
- It should correctly parse module even if import direct http.
- Actually, it did work for `dioxus-cli 0.6.0`

**Environment:**

- Dioxus version: dioxus 0.6.3 (fc1f1c2)
- Rust version: rustc 1.84.1 (e71f9a9a9 2025-01-27)
- OS info: Linux hackartist-archlinux 6.13.2-arch1-1 SMP PREEMPT_DYNAMIC Sat, 08 Feb 2025 18:54:55 +0000 x86_64 GNU/Linux
- App platform: web, fullstack

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.