Skip to content

Commit d9b705b

Browse files
authored
fix(rspeedy/core): bundle ts-blank-space (#475)
<!-- Thank you for submitting a pull request! We appreciate the time and effort you have invested in making these changes. Please ensure that you provide enough information to allow others to review your pull request. Upon submission, your pull request will be automatically assigned with reviewers. If you want to learn more about contributing to this project, please visit: https://github.com/lynx-family/lynx-stack/blob/main/CONTRIBUTING.md. --> ## Summary <!-- Can you explain the reasoning behind implementing this change? What problem or issue does this pull request resolve? --> Fix a regression from #470: "Cannot find package 'ts-blank-space' imported from @lynx-js/rspeedy/register/hooks.js" <!-- It would be helpful if you could provide any relevant context, such as GitHub issues or related discussions. --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not required).
1 parent 09c346e commit d9b705b

File tree

3 files changed

+43
-10
lines changed

3 files changed

+43
-10
lines changed

packages/rspeedy/core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@
9999
"types": "./client.d.ts"
100100
},
101101
"./register": {
102-
"types": "./register/index.d.ts",
103-
"import": "./register/index.js"
102+
"types": "./dist/register/index.d.ts",
103+
"import": "./dist/register/index.js"
104104
},
105105
"./package.json": "./package.json"
106106
},

packages/rspeedy/core/rslib.config.ts

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,22 @@ import { TypiaRspackPlugin } from 'typia-rspack-plugin'
44

55
export default defineConfig({
66
lib: [
7-
{ format: 'esm', syntax: 'es2022', dts: { bundle: true } },
7+
{
8+
format: 'esm',
9+
syntax: 'es2022',
10+
dts: { bundle: true },
11+
tools: {
12+
rspack: {
13+
plugins: [
14+
new TypiaRspackPlugin({
15+
cache: false,
16+
include: './src/config/validate.ts',
17+
tsconfig: './tsconfig.build.json',
18+
}),
19+
],
20+
},
21+
},
22+
},
823
{
924
format: 'esm',
1025
syntax: 'es2022',
@@ -16,6 +31,30 @@ export default defineConfig({
1631
},
1732
dts: false,
1833
},
34+
{
35+
format: 'esm',
36+
syntax: 'es2022',
37+
source: {
38+
entry: {
39+
'register/index': './register/index.js',
40+
'register/hooks': './register/hooks.js',
41+
},
42+
},
43+
dts: false,
44+
output: {
45+
copy: {
46+
patterns: [
47+
{
48+
from: './register/index.d.ts',
49+
to: './register/index.d.ts',
50+
},
51+
],
52+
},
53+
externals: [
54+
'typescript',
55+
],
56+
},
57+
},
1958
],
2059
output: {
2160
externals: [
@@ -31,13 +70,6 @@ export default defineConfig({
3170
optimization: {
3271
chunkIds: 'named',
3372
},
34-
plugins: [
35-
new TypiaRspackPlugin({
36-
cache: false,
37-
include: './src/config/validate.ts',
38-
tsconfig: './tsconfig.build.json',
39-
}),
40-
],
4173
},
4274
},
4375
})

packages/rspeedy/core/turbo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"^build"
1010
],
1111
"inputs": [
12+
"register",
1213
"src",
1314
"rslib.config.ts"
1415
],

0 commit comments

Comments
 (0)