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

[BUG] importScripts error when integrating third-party libraries(rainbowkit) #1110

Open
2 of 3 tasks
kuloud opened this issue Oct 18, 2024 · 0 comments
Open
2 of 3 tasks
Labels
bug Something isn't working

Comments

@kuloud
Copy link

kuloud commented Oct 18, 2024

What happened?

Wants to integrate rainbowkit with the Plasmo plugin, but the svg file in the rainbowkit component is import like this:
const src = async () => (await import('./assets.svg')).default;

as Plasmo ships with its own code/asset bundler tailored specifically, the svg resources in the rainbowkit component cannot be displayed. Because of dynamic import, rainbowkit cannot fetchTranslations internally, is there any solution to help me.

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome

Relevant log output

js-loader.js:11 Uncaught (in promise) ReferenceError: importScripts is not defined
    at js-loader.js:11:7
    at new Promise (<anonymous>)
    at js-loader.js:8:5
    at cacheLoader.js:29:27
    at 7mEo1.5af47ba2d54ff069 (runtime-0a16f36cb5de880c.js:1:213)
    at newRequire (contents.c6c0b27c.js:72:24)
    at localRequire (contents.c6c0b27c.js:85:35)
    at fetchTranslations (index.js:750:10)
    at setLocale (index.js:766:24)
    at index.js:801:6

(OPTIONAL) Contribution

  • I would like to fix this BUG via a PR

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@kuloud kuloud added the bug Something isn't working label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant