Skip to content

Commit

Permalink
ci(cloudflare): addon cloudflaare redirects file
Browse files Browse the repository at this point in the history
  • Loading branch information
innocces committed Sep 27, 2023
1 parent 96898f4 commit 018e1ce
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions _redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/ /site

/vue/pages/:type/:index* /vue/index.html
/vue/pages/:type/:index/:second* /vue/index.html
/vue/pages/:type/:index/:second/:main* /vue/index.html

/react/pages/:type/:index* /react/index.html
/react/pages/:type/:index/:second* /react/index.html
/react/pages/:type/:index/:second/:main* /react/index.html
4 changes: 4 additions & 0 deletions scripts/build-docs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ async function main() {
console.log(chalk.blue('copy plugin-react demo....'));
const pluginReactBuildDir = 'examples/taro-hooks-plugin/dist';
await $`cp -r -f ${pluginReactBuildDir}/ ${deployDirName}/react`;

// copy _redirects
console.log(chalk.blue('copy _redirects....'));
await $`cp -r -f ${cwd()}/_redirects ${deployDirName}`;
} catch (e) {
console.log(chalk.redBright('generate-docs failed'), e.message);
process.exit();
Expand Down

1 comment on commit 018e1ce

@vercel
Copy link

@vercel vercel bot commented on 018e1ce Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.