create-chrome-ext icon indicating copy to clipboard operation
create-chrome-ext copied to clipboard

Failed to construct 'WebSocket': The URL 'ws://localhost:undefined/' is invalid.

Open casperkwok opened this issue 1 year ago • 4 comments

Uncaught (in promise) SyntaxError: Failed to construct 'WebSocket': The URL 'ws://localhost:undefined/' is invalid.

casperkwok avatar Feb 24 '24 04:02 casperkwok

@zanekwok bro, add this config in vite.config.js

    server: {
      port: 5173,
      strictPort: true,
      hmr: {
        port: 5173,
      },
    },

heo001997 avatar Feb 27 '24 14:02 heo001997

@zanekwok bro, add this config in vite.config.js

    server: {
      port: 5173,
      strictPort: true,
      hmr: {
        port: 5173,
      },
    },

This will crash browser on every background/index.js edit. Didn't find any better option though.

RomkaLTU avatar Jun 10 '24 05:06 RomkaLTU