Skip to content

Commit ec28fa1

Browse files
committed
devtools support
1 parent 8a4a893 commit ec28fa1

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
- **_Recently updated from React ~~16~~ to 17 and Webpack ~~4~~ to 5!_**
1515
- **_Recently added [TypeScript](https://www.typescriptlang.org/) Support!_**
16+
- **_Recently added [devtools](https://developer.chrome.com/docs/extensions/mv3/devtools/) Support! Thanks [GeekaholicLin](https://github.com/lxieyang/chrome-extension-boilerplate-react/issues/17)!_**
1617

1718
## Features
1819

src/pages/Devtools/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
chrome.devtools.panels.create('Dev Tools', 'icon-34.png', 'panel.html');
1+
chrome.devtools.panels.create(
2+
'Dev Tools from chrome-extension-boilerplate-react',
3+
'icon-34.png',
4+
'panel.html'
5+
);

src/pages/Panel/Panel.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React from 'react';
2-
32
import './Panel.css';
43

5-
const Panel = (): JSX.Element => {
4+
const Panel: React.FC = () => {
65
return (
76
<div className="container">
87
<h1>Dev Tools Panel</h1>

src/pages/Panel/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<title>Panel</title>
5+
<title>Dev Tools Panel</title>
66
</head>
77

88
<body>

0 commit comments

Comments
 (0)