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

crxjs does not support HTTPS flag in vite #852

Open
1 of 2 tasks
kaminskypavel opened this issue Jan 3, 2024 · 1 comment
Open
1 of 2 tasks

crxjs does not support HTTPS flag in vite #852

kaminskypavel opened this issue Jan 3, 2024 · 1 comment

Comments

@kaminskypavel
Copy link

Build tool

Vite

Where do you see the problem?

  • In the browser
  • In the terminal

Describe the bug

I have a content-script running on a https website, settings https flag on vite config is being ignored.

Reproduction

in vite.config.ts

  server: {
    https: true,   <--------------
    port: 5173,
    hmr: {
      clientPort: 5173
    },
    proxy: {
      '/api': {
        target: 'http://localhost:3010',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ''),
      },
    },
  },
})

and results in an error

Service worker registration failed. Status code: 3

  "background": {
    "service_worker": "service-worker-loader.js",
    "type": "module"
  },

I believe this has to do with the encoded value in plugin-background.ts

if you can confirm this is the case i don't mind submitting a PR

Logs

No response

System Info

System:
    OS: Windows 11
    CPU: (16) x64 Intel(R) Core(TM) i7-10870H CPU @ 2.20GHz
    Memory: 41 GB / 63 GB
  Binaries:
    Node: 20.7.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.12.0 - ~\AppData\Local\pnpm\pnpm.EXE
  Browsers:
    Edge: Chromium (120.0.2210.91)

Severity

blocking an upgrade

@kaminskypavel
Copy link
Author

@jacksteamdev if you'd like to guide me a bit here, I can take a shot at this issue

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

1 participant