Skip to content

Commit

Permalink
feat: react support
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat committed Sep 18, 2024
1 parent 3e4353b commit e87da96
Show file tree
Hide file tree
Showing 7 changed files with 356 additions and 193 deletions.
3 changes: 2 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
const esbuild = require('esbuild');

esbuild.build({
entryPoints: ['src/popup.ts', 'src/content.ts', 'src/background.ts', 'src/injectScript.ts'],
entryPoints: ['src/popup.tsx', 'src/content.ts', 'src/background.ts', 'src/injectScript.ts'],
bundle: true,
minify: true,
sourcemap: true,
outdir: 'dist',
target: ['es2020'],
format: 'iife',
loader: { '.tsx': 'tsx' },
}).catch(() => process.exit(1));
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@
"packageManager": "pnpm@9.1.3+sha256.7f63001edc077f1cff96cacba901f350796287a2800dfa83fe898f94183e4f5f",
"devDependencies": {
"@types/chrome": "^0.0.271",
"@types/react": "^18.3.7",
"@types/react-dom": "^18.3.0",
"esbuild": "^0.23.1"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "^2.21.8"
}
}
76 changes: 76 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<title>i7n</title>
<link href="style.css" rel="stylesheet">
<style>
body { width: 350px; padding: 10px; }
body { width: 350px; }
</style>
</head>
<body class="bg-slate-950">
<div id="result"></div>
<div id="root"></div>
<script src="dist/popup.js"></script>
</body>
</html>
190 changes: 0 additions & 190 deletions src/popup.ts

This file was deleted.

Loading

0 comments on commit e87da96

Please sign in to comment.