Skip to content

Commit 0adf43b

Browse files
committed
fix: 用知乎源解决unpkg无法访问的问题
1 parent b503542 commit 0adf43b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/download-react.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ const pluginTitle = `${author}/${name}`;
44

55
const version = '18';
66
const [reactDev, reactDomDev, react, reactDom] = await Promise.all([
7-
fetch(`https://unpkg.com/react@${version}/umd/react.development.js`).then((r) => r.text()),
8-
fetch(`https://unpkg.com/react-dom@${version}/umd/react-dom.development.js`).then((r) => r.text()),
9-
fetch(`https://unpkg.com/react@${version}/umd/react.production.min.js`).then((r) => r.text()),
10-
fetch(`https://unpkg.com/react-dom@${version}/umd/react-dom.production.min.js`).then((r) => r.text()),
7+
fetch(`https://unpkg.zhimg.com/react@${version}/umd/react.development.js`).then((r) => r.text()),
8+
fetch(`https://unpkg.zhimg.com/react-dom@${version}/umd/react-dom.development.js`).then((r) => r.text()),
9+
fetch(`https://unpkg.zhimg.com/react@${version}/umd/react.production.min.js`).then((r) => r.text()),
10+
fetch(`https://unpkg.zhimg.com/react-dom@${version}/umd/react-dom.production.min.js`).then((r) => r.text()),
1111
]);
1212

1313
const distDir = path.join(__dirname, '..', 'dist');

0 commit comments

Comments
 (0)