Skip to content

Commit

Permalink
🐛 fix: Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 25, 2024
1 parent e2f634a commit 947bd21
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 58 deletions.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const themeConfig: SiteThemeConfig = {
export default defineConfig({
alias: {
'@lobehub/tts/react': path.join(__dirname, './src/react'),
'@lobehub/tts/server': path.join(__dirname, './src/server'),
},
apiParser: isProduction ? {} : false,
base: '/',
Expand Down
File renamed without changes.
15 changes: 1 addition & 14 deletions .fatherrc.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
import { defineConfig } from 'father';

export default defineConfig({
esm: {
output: 'dist',
overrides: {
'src/core': {
output: 'core',
},
'src/react': {
output: 'react',
},
'src/server': {
output: 'server',
},
},
},
esm: { output: 'es' },
});
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ public/*.js
bun.lockb
react/**
server/**

core/**
react.d.ts
server.d.ts
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
52 changes: 15 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lobehub/tts",
"version": "1.25.7",
"version": "beta",
"description": "A high-quality & reliable TTS React Hooks library",
"homepage": "https://github.com/lobehub/lobe-tts",
"bugs": {
Expand All @@ -13,36 +13,18 @@
"license": "MIT",
"author": "LobeHub <[email protected]>",
"sideEffects": false,
"type": "module",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./core/index.d.ts",
"import": "./core/index.js",
"module": "./core/index.js"
},
"./server": {
"types": "./server/index.d.ts",
"import": "./server/index.js",
"module": "./server/index.js"
},
"./react": {
"types": "./react/index.d.ts",
"import": "./react/index.js",
"module": "./react/index.js"
}
},
"main": "./core/index.js",
"module": "./core/index.js",
"types": "./core/index.d.ts",
"main": "es/index.js",
"module": "es/index.js",
"types": "es/index.d.ts",
"files": [
"dist",
"core",
"react",
"server"
"es",
"server.d.ts",
"server.js",
"react.d.ts",
"react.js"
],
"scripts": {
"build": "father build",
"build": "father build && cp react.js react.d.ts && cp server.js server.d.ts",
"ci": "npm run lint && npm run type-check && npm run doctor",
"dev": "father dev",
"docs:build": "npm run build && dumi build",
Expand Down Expand Up @@ -83,11 +65,6 @@
"eslint --fix"
]
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 10"
],
"dependencies": {
"@babel/runtime": "^7.26.0",
"lodash-es": "^4.17.21",
Expand All @@ -105,18 +82,18 @@
"@commitlint/cli": "^19.6.0",
"@lobehub/i18n-cli": "^1.20.0",
"@lobehub/lint": "^1.24.4",
"@lobehub/ui": "^1.153.1",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.17.7",
"@types/react": "^18.3.12",
"@types/react": "18.2.40",
"@types/react-dom": "^18.3.1",
"@types/uuid": "^9.0.8",
"@vercel/node": "^3.2.26",
"@vitest/coverage-v8": "~1.2.2",
"babel-plugin-antd-style": "^1.0.4",
"commitlint": "^19.6.0",
"concurrently": "^9.1.0",
"dumi": "^2.4.14",
"dumi-theme-lobehub": "^1.10.4",
"dumi-theme-lobehub": "^1.10.6",
"eslint": "^8.57.1",
"father": "^4.5.1",
"husky": "^9.1.7",
Expand All @@ -128,7 +105,8 @@
"stylelint": "^15.11.0",
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"vercel": "^28.20.0"
"vercel": "^28.20.0",
"vitest": "~1.2.2"
},
"peerDependencies": {
"@lobehub/ui": ">=1",
Expand Down
1 change: 1 addition & 0 deletions react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './es/react';
1 change: 1 addition & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './es/server';
21 changes: 15 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,24 @@
"esModuleInterop": true,
"jsx": "react-jsx",
"lib": ["dom", "dom.iterable", "esnext"],
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"module": "esnext",
"moduleResolution": "node",
"paths": {
"@@/*": [".dumi/tmp/*"],
"@/*": ["./src/*"],
"@lobehub/tts": ["./src/core"],
"@lobehub/tts/react": ["./src/react"]
}
"@lobehub/tts": ["./src"],
"@lobehub/tts/*": ["src/*"],
"@lobehub/tts/react": ["./src/react"],
"@lobehub/tts/react/*": ["./src/react/*"],
"@lobehub/tts/server": ["./src/server"],
"@lobehub/tts/server/*": ["./src/server/*"]
},
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "es6",
"types": ["vitest/globals"]
},
"exclude": ["./react.d.ts", "./server.d.ts"],
"include": ["src", "docs", ".dumirc.ts", "api", "**/*.ts", "**/*.d.ts", "**/*.tsx"]
}

0 comments on commit 947bd21

Please sign in to comment.