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

Cannot access extension pages in server/dev mode #98

Open
AqueelAhmedV opened this issue Oct 26, 2024 · 2 comments
Open

Cannot access extension pages in server/dev mode #98

AqueelAhmedV opened this issue Oct 26, 2024 · 2 comments

Comments

@AqueelAhmedV
Copy link

AqueelAhmedV commented Oct 26, 2024

Issue started after updating to Chrome 130.0.6723.70 (Windows),
extension pages like sidepanel.html, and popup.html show flashing Vite Dev Mode page in server/dev mode (yarn dev)

My vite.config.js:

import { defineConfig } from 'vite'
import { crx } from '@crxjs/vite-plugin'
import react from '@vitejs/plugin-react'
import manifest from './src/manifest.js'

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
  return {
    build: {
      emptyOutDir: true,
      outDir: 'build',
      rollupOptions: {
        output: {
          chunkFileNames: 'assets/chunk-[hash].js',
        },
      },
    },
    server: {
      port: 5000,
      watch: {
        includes: [
          './src/background/index.js',
          './public/script.js',
        ]
      },
    },
    plugins: [crx({ manifest }), react()],
  }
})
@AqueelAhmedV AqueelAhmedV changed the title Cannot access extension pages, vite build also not working Cannot access extension pages in server/dev mode Oct 26, 2024
@sakibul-islam
Copy link
Contributor

Update the @crxjs/vite-plugin package to the latest release:

yarn add -D @crxjs/vite-plugin@^2.0.0-beta.28

It should fix the issue.

@AqueelAhmedV
Copy link
Author

It worked. Thank you

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

No branches or pull requests

2 participants