Skip to content

v0.2.3 and onwards seems to break when loaded as module #585

@Hvaheterdu

Description

@Hvaheterdu

Describe the bug
We are bundling our app with vite as a module, importing into our app with

<script type="module" src="/src/main.tsx"></script>

After upgrading from 0.2.2 to 0.2.3 (on onwards), this no longer works in Edge (139.0.3405.86), Firefox (141.0.3) or Chrome (139.0.7258.127).

The console is showing this

Image Image

The file it comes from i located in node_modules/.vite/deps/@fortawesome_react-fontawesome.js

I saw a issue similar to this in the vue-fontawesome repository.

Reproducible test case
See above.

Expected behavior
Bundles loaded as modules should load without error.

Desktop (please complete the following information):

  • Browser: Edge (139.0.3405.86), Firefox (141.0.3) or Chrome (139.0.7258.127).
  • Version: See above, this fails.

Additional context
This issue only appears in remote development environment and not during local development.

I saw a issue similar to this in the vue-fontawesome repository. Applying the temporary fix that someone suggested works.

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