Skip to content

Commit 9f8403c

Browse files
committed
chore: inline svg to save traffic
1 parent a1e36fe commit 9f8403c

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

build.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ async function runWebpack(isWithoutKatex, callback) {
169169
type: 'asset/inline',
170170
},
171171
{
172-
test: /\.jpg$/,
172+
test: /\.(jpg|svg)$/,
173173
type: 'asset/inline',
174174
},
175175
],

src/popup/Popup.jsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import Browser from 'webextension-polyfill'
1818
import PropTypes from 'prop-types'
1919
import { config as toolsConfig } from '../content-script/selection-tools'
2020
import wechatpay from './donation/wechatpay.jpg'
21+
import bugmeacoffee from './donation/bugmeacoffee.svg'
2122

2223
function GeneralPart({ config, updateConfig }) {
2324
const [balance, setBalance] = useState(null)
@@ -336,11 +337,7 @@ function Donation() {
336337
target="_blank"
337338
rel="nofollow noopener noreferrer"
338339
>
339-
<img
340-
align="center"
341-
alt="buymeacoffee"
342-
src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg"
343-
/>
340+
<img alt="buymeacoffee" src={bugmeacoffee} />
344341
</a>
345342
<hr />
346343
<>

0 commit comments

Comments
 (0)