DEV Community

MrChoke
MrChoke

Posted on

2 1

Fix: Svelte Devtools on Chrome/Brave

สืบเนื่องมาจาก Official Svelte Devtools ไม่ยอมทำงานบน Chrome และ Brave เลยค้นหาดูพบว่ามันเป็น Bug และทางต้นน้ำก็ไม่มี update มาปีกว่าแล้ว มีคน PR เข้าไปแก้ง่าย ๆ แค่หนึงบรรทัดเลยลองทำตามดูก็กลับมาทำงานได้ ใครประสบปัญหาอยู่ก็ลองทำดูได้ครับ ขั้นตอนดังนี้

Git Clone

git clone https://github.com/sveltejs/svelte-devtools.git
Enter fullscreen mode Exit fullscreen mode

Edit

หลังจากนั้นให้แก้ไข dest/devtools/index.js โดยการลบ / บรรทัดที่ 6 ออก

- '/devtools/panel.html',
+ 'devtools/panel.html',
Enter fullscreen mode Exit fullscreen mode

Install

ให้ลบของเก่าออกแล้วทำการติดตั้งแบบ Load Unpacked

Chrome Extension installation

หลังจากนั้นก็จะปรากฎ Extension ดังนี้

Chrome Extension

Use

หลังจากนั้นก็สามารถใช้งานได้ตามปกติแล้ว

Svelte Devtools

ต้นฉบับ:

https://github.com/sveltejs/svelte-devtools/pull/78

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (1)

Collapse
 
veer66 profile image
Vee Satayamas

🙏

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay