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

hot-reloading doesn't remove old versions of content scripts #207

Open
Hades32 opened this issue Oct 4, 2024 · 3 comments
Open

hot-reloading doesn't remove old versions of content scripts #207

Hades32 opened this issue Oct 4, 2024 · 3 comments
Assignees

Comments

@Hades32
Copy link

Hades32 commented Oct 4, 2024

If I change e.g. the number in this content script (yes, it's only one line), then the browser does reload, but now I get two log lines, one for the old and one for the new version

Also a full reload of the page doesn't fix this

content script

console.log("hello from TWITCH 3 content_scripts");

version

"extension": "^2.0.0-beta.1"

Manifest snippet

  "content_scripts": [
    {
      "matches": [
        "https://twitch.tv/*",
        "https://*.twitch.tv/*"
      ],
      "js": [
        "content/twitch-script.ts"
      ]
    },
    {
      "matches": [
      "https://youtube.com/*",
      "https://*.youtube.com/*"
      ],
      "js": [
        "content/youtube-script.ts"
      ]
    }
  ]
@cezaraugusto
Copy link
Member

hi @Hades32, thanks for reporting. are you using the TypeScript template? please share the tsconfig.json/typescript version if not so I can take a closer look

@Hades32
Copy link
Author

Hades32 commented Oct 4, 2024

yes, I was using the content-typescript template, but just to be sure, that's the file

{
  "compilerOptions": {
    "allowJs": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "isolatedModules": true,
    "jsx": "react-jsx",
    "lib": ["dom", "dom.iterable", "esnext"],
    "moduleResolution": "node",
    "module": "esnext",
    "noEmit": true,
    "resolveJsonModule": true,
    "strict": true,
    "target": "esnext",
    "verbatimModuleSyntax": true,
    "useDefineForClassFields": true,
    "skipLibCheck": true
  },
  "include": ["./"],
  "exclude": ["node_modules", "dist"]
}

and the TS version

		"typescript": "^5.4.2",

@cezaraugusto
Copy link
Member

thanks, on it

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

No branches or pull requests

2 participants