Skip to content

Conversation

@Kamesuta
Copy link

@Kamesuta Kamesuta commented Oct 15, 2022

Problem

When I edit the code and reload the Firefox extension by "Firefox: Reload add-on", the changes are not applied.
This Pull Request solves this problem.

2022-10-16_00h20_41

Steps to reproduce

  1. Create web extension project by npm init webextension firefox-webext-test.

  2. Open project with Visual Studio Code.

  3. Create launch.json in .vscode directory.

    Code
    {
        "version": "0.2.0",
        "configurations": [
            {
                "type": "firefox",
                "request": "launch",
                "name": "Launch add-on",
                "addonPath": "${workspaceFolder}",
                "url": "https://developer.mozilla.org/"
            }
        ]
    }
  4. Replace the code in content.js with alert("Test v1");.

  5. Press F5 to launch Firefox and you will see Test v1.

  6. Replace the code in content.js with alert("Test v2");.

  7. Press Ctrl+Shift+P and select Firefox: Reload add-on.

  8. Reload the page in Firefox, it still keeps showing Test v1. It does not become Test v2.

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 this pull request may close these issues.

1 participant