Skip to content

Commit

Permalink
feat: 🎸 safari 兼容
Browse files Browse the repository at this point in the history
  • Loading branch information
Zichun627 committed Jan 11, 2024
1 parent b5dba32 commit d0617ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 13 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ export default defineConfig({
image: {
domain: ["img.alicdn"]
},
vite: {
optimizeDeps: {
esbuildOptions: {
target:'es2020' // 指定ES版本以更好地进行代码转换
}
},
esbuild: {
// 确保Babel能够处理JSX和其他特性
jsxInject: `import React from 'react'`,
jsxFactory: 'React.createElement',
jsxFragment: 'React.Fragment',
},
},
integrations: [
starlight({
title: 'Nacos',
Expand Down
1 change: 0 additions & 1 deletion src/components/common/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ let _dataSource = _.cloneDeep(dataSource);
(() => {
console.log("888888")
const pathname = Astro.url.pathname;
if (!pathname.startsWith('/docs/')) return;
if (pathname.startsWith('/docs/ebook')) return;
Expand Down

0 comments on commit d0617ba

Please sign in to comment.