Skip to content

Commit

Permalink
fix: 虚拟模块类型定义
Browse files Browse the repository at this point in the history
  • Loading branch information
c0dedance committed Oct 14, 2023
1 parent e1c8cff commit a8ff646
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/shared/types/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module 'island:site-data' {
import type { UserConfig } from 'shared/types'
const siteData: UserConfig
export default siteData
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"module": "commonjs" /* Specify what module code is generated. */,
"rootDir": "." /* Specify the root folder within your source files. */,
"baseUrl": "src",
"jsx": "react-jsx" /* Specify what JSX code is generated. */,
"resolveJsonModule": true,
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
Expand Down

0 comments on commit a8ff646

Please sign in to comment.