Skip to content

Commit

Permalink
fix: vite5 relative warnings and deprecated usage (#2704)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-huxiyang authored Nov 10, 2024
1 parent 301a9e0 commit bec0315
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# .env
VITE_RTL=ltr
3 changes: 2 additions & 1 deletion src/sites/doc/components/demoblock/codeblock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import DemoBlock from './demoblock'
import './demoblock.scss'

const modules = import.meta.glob('@/packages/**/demos/*/*.tsx', {
as: 'raw',
query: '?raw',
import: 'default',
eager: true,
})
// console.log('modules', modules)
Expand Down
15 changes: 9 additions & 6 deletions src/sites/theme/router.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const modulesPage = import.meta.glob('/src/packages/**/doc.md', {
as: 'raw',
eager: true
query: '?raw',
import: 'default',
eager: true,
})
const routes: any[] = []
for (const path in modulesPage) {
Expand All @@ -13,8 +14,9 @@ for (const path in modulesPage) {
}

const modulesENPage = import.meta.glob('/src/packages/**/doc.en-US.md', {
as: 'raw',
eager: true
query: '?raw',
import: 'default',
eager: true,
})
// console.log('modulesENPage', modulesENPage)
for (const path in modulesENPage) {
Expand All @@ -27,8 +29,9 @@ for (const path in modulesENPage) {
}

const modulesTaroPage = import.meta.glob('/src/packages/**/doc.taro.md', {
as: 'raw',
eager: true
query: '?raw',
import: 'default',
eager: true,
})
// console.log('modulesTaroPage', modulesTaroPage)
for (const path in modulesTaroPage) {
Expand Down

0 comments on commit bec0315

Please sign in to comment.