增加自动http协议
parent
7fb2479033
commit
45e0ad2979
2
index.js
2
index.js
|
@ -67,7 +67,7 @@ std.out = function (...args) {
|
|||
const HMR_SCRIPT = `
|
||||
<script>
|
||||
!(function http_hmr(){
|
||||
var ws = new WebSocket(\`ws://\${location.host}/ws-http-hmr\`)
|
||||
var ws = new WebSocket(\`\${location.protocol === 'https:' ? 'wss' : 'ws'}://\${location.host}/ws-http-hmr\`)
|
||||
ws.addEventListener('open', function (r) {
|
||||
if(http_hmr.closed){
|
||||
delete http_hmr.closed
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "simple-http",
|
||||
"displayName": "simple http",
|
||||
"description": "🔥 简单的http服务器, 方便临时调试html",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.2",
|
||||
"publisher": "yutent",
|
||||
"author": "Yutent [@yutent]",
|
||||
"icon": "logo.png",
|
||||
|
|
Loading…
Reference in New Issue