Skip to content

Commit d74b565

Browse files
authored
refactor: load config with shared config loader package (#1)
1 parent 4ce72af commit d74b565

6 files changed

Lines changed: 25 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"test": "pnpm --filter './packages/**' test"
1515
},
1616
"devDependencies": {
17+
"@rstackjs/load-config": "catalog:",
1718
"@types/node": "catalog:",
1819
"cspell-ban-words": "catalog:",
1920
"husky": "catalog:",

packages/rstack/rslib.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ export default defineConfig({
1818
RSTACK_VERSION: JSON.stringify(pkgJson.version),
1919
},
2020
},
21+
output: {
22+
externals: ['jiti'],
23+
},
2124
});

packages/rstack/src/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { loadConfig, type RsbuildConfigDefinition } from '@rsbuild/core';
1+
import { loadConfig } from '@rstackjs/load-config';
2+
import type { RsbuildConfigDefinition } from '@rsbuild/core';
23
import type { RslibConfigDefinition } from '@rslib/core';
34
import type { RslintConfig } from '@rslint/core';
45
import type { UserConfig, UserConfigAsyncFn } from '@rspress/core';

pnpm-lock.yaml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ catalog:
1616
'@rslib/core': '~0.23.2'
1717
'@rslint/core': '~0.6.5'
1818
'@rspress/core': '^2.0.17'
19+
'@rstackjs/load-config': ^0.1.1
1920
'@rstest/adapter-rsbuild': '~0.11.0'
2021
'@rstest/adapter-rslib': '~0.11.0'
2122
'@rstest/core': '~0.11.0'
@@ -51,6 +52,7 @@ minimumReleaseAgeExclude:
5152
- '@rspress/*'
5253
- '@rstest/*'
5354
- '@rslint/*'
55+
- '@rstackjs/*'
5456
- '@rstack-dev/doc-ui'
5557
- 'rsbuild-plugin-*'
5658
- '@swc/*'

scripts/dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ rslint
66
rspack
77
rspress
88
rstack
9+
rstackjs
910
rstest
1011
turborepo

0 commit comments

Comments
 (0)