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

Trying to load "assets/js/index.js" & "assets/js/jsx-runtime.js" from web page itself #23

Closed
deld123 opened this issue Aug 2, 2022 · 6 comments · Fixed by #24
Closed

Comments

@deld123
Copy link

deld123 commented Aug 2, 2022

Hello, thanks for the great boilerplate.

Everything works seamlessly, but I see 2 errors in the console. Looks like trying to load assets/js/index.js & assets/js/jsx-runtime.js from web page itself instead from extension.

Screenshot of github.com/...'s console.
image

Refused to load the script 'https://github.com/assets/js/index.js' because it violates the following Content Security Policy directive: "script-src github.githubassets.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Refused to load the script 'https://github.com/assets/js/jsx-runtime.js' because it violates the following Content Security Policy directive: "script-src github.githubassets.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Thank you for your help.

@github-actions
Copy link

github-actions bot commented Aug 2, 2022

Thank you for your contribution. We will check and reply to you as soon as possible.

@ArtemEkzarho
Copy link

ArtemEkzarho commented Aug 3, 2022

Have the same problem(
my manifest

{
  "manifest_version": 3,
  "name": "name",
  "version": "3.0.0",
  "description": "description",
  "homepage_url": "https://homepage_url",
  "options_page": "src/pages/options/index.html",
  "background": {
    "service_worker": "src/pages/background/index.js",
    "type": "module"
  },
  "action": {
    "default_title": "default_title",
    "default_icon": "logo-48.png"
  },
  "icons": {
    "128": "logo-128.png"
  },
  "content_scripts": [
    {
      "matches": [
        "http://*/*",
        "https://*/*",
        "<all_urls>"
      ],
      "js": [
        "src/pages/content/index.js"
      ]
    }
  ],
  "web_accessible_resources": [
    {
      "resources": [
        "assets/js/*.js",
        "src/pages/shared/*.js"
      ],
      "matches": [
        "*://*/*"
      ]
    }
  ],
  "permissions": [
    "storage",
    "tabs",
    "system.display"
  ],
  "content_security_policy": {
    "extension_pages": "script-src 'self'; object-src 'self'"
  }
}

@Jonghakseo
Copy link
Owner

@deld123 @ArtemEkzarho

Thank you for contributing to the project through issues.

It has been identified as a problem with the interpretation of dynamic imports inside rollup.
So I added custom plugin to fix dynamic import syntax to fix the issue.

Would you like to check again with the latest version?

@Jonghakseo Jonghakseo linked a pull request Aug 3, 2022 that will close this issue
@deld123
Copy link
Author

deld123 commented Aug 8, 2022

#24 fixed the issue. Thank you very much 🙏

@deld123 deld123 closed this as completed Aug 8, 2022
@Jonghakseo
Copy link
Owner

@all-contributors please add @deld123 for bug

@allcontributors
Copy link
Contributor

@Jonghakseo

I've put up a pull request to add @deld123! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants