Skip to content

Commit

Permalink
fix: stackblitz 报错修复
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaohappy committed Dec 17, 2024
1 parent 6ddb654 commit 5bfc318
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
21 changes: 10 additions & 11 deletions site/.dumi/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,19 @@ const template = {
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"declaration": false,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"baseUrl": "./",
"paths": {
"@libmedia/common/*": ["node_modules/@libmedia/common/dist/esm/*"],
"@libmedia/cheap/*": ["node_modules/@libmedia/cheap/dist/esm/*"],
Expand All @@ -87,12 +85,12 @@ const template = {
"@libmedia/avutil/*": ["node_modules/@libmedia/avutil/dist/esm/*"],
"@libmedia/videoscale/*": ["node_modules/@libmedia/videoscale/dist/esm/*"],
"@libmedia/avfilter/*": ["node_modules/@libmedia/avfilter/dist/esm/*"]
},
"files": [
"node_modules/@libmedia/cheap/dist/esm/cheapdef.d.ts"
]
}
},
"include": ["src"],
"files": [
"node_modules/@libmedia/cheap/dist/esm/cheapdef.d.ts"
],
"references": [{ "path": "./tsconfig.node.json" }]
}
`,
Expand Down Expand Up @@ -162,7 +160,7 @@ export default defineConfig({
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
Expand All @@ -174,10 +172,11 @@ export default defineConfig({
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react": "^4.2.1",
"@rollup/plugin-typescript": "^12.1.1",
"typescript": "^5.2.2",
"typescript": "^5.6.3",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.1",
"vite": "^5.2.0"
"vite": "^6.0.1",
"tslib": "^2.8.1"
}
}
`,
Expand Down
4 changes: 2 additions & 2 deletions site/docs/demo/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export function formatUrl(
window.location.hostname.includes('webcontainer.io') ||
window.location.hostname.includes('stackblitz.io') ||
window.location.hostname.includes('csb.app')
? BASE_URL
? (BASE_URL + '/docs')
: '';
const prefix = process.env.NODE_ENV === 'development' ? '/' : '/docs/'
const prefix = process.env.NODE_ENV === 'development' ? '/' : '/libmedia/docs/'
return `${base}${prefix}${url}`
}

Expand Down
4 changes: 3 additions & 1 deletion site/docs/guide/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ yarn add @libmedia/avcodec
}
```

主要是 ```paths``` 设置和 ```files``` 设置。```paths``` 根据自己的使用情况配置无需全部配置。
主要是 ```paths``` 设置和 ```files``` 设置。```paths``` 根据自己的使用情况配置无需全部配置;

_```isolatedModules``````skipLibCheck``` 不能设置为 true_

## 编译配置

Expand Down

0 comments on commit 5bfc318

Please sign in to comment.