Skip to content

Commit 1c34762

Browse files
committed
feat: delete modern runtime config
1 parent 0d7182a commit 1c34762

File tree

11 files changed

+14
-78
lines changed

11 files changed

+14
-78
lines changed

packages/cli/plugin-bff/tests/server.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export async function serverInit({
3535
tools: {},
3636
server: {},
3737
html: {},
38-
runtime: {},
3938
bff: {},
4039
security: {},
4140
},

packages/document/docs/en/guides/advanced-features/page-performance/react-compiler.mdx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ The steps to use the React Compiler in Modern.js are as follows:
1818
import { appTools, defineConfig } from '@modern-js/app-tools';
1919

2020
export default defineConfig({
21-
runtime: {
22-
router: true,
23-
},
2421
tools: {
2522
babel(_, { addPlugins }) {
2623
addPlugins([
@@ -33,9 +30,7 @@ export default defineConfig({
3330
]);
3431
},
3532
},
36-
plugins: [
37-
appTools(),
38-
],
33+
plugins: [appTools()],
3934
});
4035
```
4136

packages/document/docs/en/guides/get-started/quick-start.mdx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar_position: 2
77

88
## Environment
99

10-
import Prerequisites from "@site-docs-en/components/prerequisites"
10+
import Prerequisites from '@site-docs-en/components/prerequisites';
1111

1212
<Prerequisites />
1313

@@ -30,13 +30,13 @@ npx @modern-js/create@latest myapp
3030

3131
## Initialize
3232

33-
import InitApp from "@site-docs-en/components/init-app"
33+
import InitApp from '@site-docs-en/components/init-app';
3434

3535
<InitApp />
3636

3737
## Development
3838

39-
import DebugApp from "@site-docs-en/components/debug-app"
39+
import DebugApp from '@site-docs-en/components/debug-app';
4040

4141
<DebugApp />
4242

@@ -50,9 +50,6 @@ You can modify the configuration through this file to override the default behav
5050
import { appTools, defineConfig } from '@modern-js/app-tools';
5151

5252
export default defineConfig({
53-
runtime: {
54-
router: true,
55-
},
5653
server: {
5754
ssr: true,
5855
},
@@ -150,6 +147,6 @@ Open `http://localhost:8080/` in the browser, and the content should be consiste
150147

151148
## Deployment
152149

153-
import Deploy from "@site-docs-en/components/deploy"
150+
import Deploy from '@site-docs-en/components/deploy';
154151

155152
<Deploy />

packages/document/docs/en/guides/topic-detail/module-federation/usage.mdx

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,7 @@ import { appTools, defineConfig } from '@modern-js/app-tools';
2121
import { moduleFederationPlugin } from '@module-federation/modern-js';
2222

2323
export default defineConfig({
24-
runtime: {
25-
router: true,
26-
},
27-
plugins: [
28-
appTools(),
29-
moduleFederationPlugin(),
30-
],
24+
plugins: [appTools(), moduleFederationPlugin()],
3125
});
3226
```
3327

@@ -80,13 +74,7 @@ export default defineConfig({
8074
dev: {
8175
port: 3051,
8276
},
83-
runtime: {
84-
router: true,
85-
},
86-
plugins: [
87-
appTools(),
88-
moduleFederationPlugin(),
89-
],
77+
plugins: [appTools(), moduleFederationPlugin()],
9078
});
9179
```
9280

@@ -191,19 +179,13 @@ export default defineConfig({
191179
server: {
192180
port: 3051,
193181
},
194-
runtime: {
195-
router: true,
196-
},
197182
output: {
198183
// Now this configuration is only used in the local when you run modern serve command.
199184
// If you want to deploy the application to the platform, use your own domain name.
200185
// Module federation will automatically write it to mf-manifest.json, which influences consumer to fetch remoteEntry.js.
201186
assetPrefix: 'http://127.0.0.1:3051',
202187
},
203-
plugins: [
204-
appTools(),
205-
moduleFederationPlugin(),
206-
],
188+
plugins: [appTools(), moduleFederationPlugin()],
207189
});
208190
```
209191

packages/document/docs/zh/guides/advanced-features/page-performance/react-compiler.mdx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ React Compiler 是 React 19 引入的一个实验性编译器,它可以自动
1818
import { appTools, defineConfig } from '@modern-js/app-tools';
1919

2020
export default defineConfig({
21-
runtime: {
22-
router: true,
23-
},
2421
tools: {
2522
babel(_, { addPlugins }) {
2623
addPlugins([
@@ -33,9 +30,7 @@ export default defineConfig({
3330
]);
3431
},
3532
},
36-
plugins: [
37-
appTools(),
38-
],
33+
plugins: [appTools()],
3934
});
4035
```
4136

packages/document/docs/zh/guides/get-started/quick-start.mdx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,10 @@ import DebugApp from '@site-docs/components/debug-app';
5050
import { appTools, defineConfig } from '@modern-js/app-tools';
5151

5252
export default defineConfig({
53-
runtime: {
54-
router: true,
55-
},
5653
server: {
5754
ssr: true,
5855
},
59-
plugins: [
60-
appTools(),
61-
],
56+
plugins: [appTools()],
6257
});
6358
```
6459

packages/document/docs/zh/guides/topic-detail/module-federation/usage.mdx

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,8 @@ import { appTools, defineConfig } from '@modern-js/app-tools';
2121
import { moduleFederationPlugin } from '@module-federation/modern-js';
2222

2323
export default defineConfig({
24-
runtime: {
25-
router: true,
26-
},
27-
plugins: [
28-
appTools(),
29-
moduleFederationPlugin(),
30-
],
24+
plugins: [appTools(), moduleFederationPlugin()],
3125
});
32-
3326
```
3427

3528
## 生产者导出模块
@@ -81,13 +74,7 @@ export default defineConfig({
8174
dev: {
8275
port: 3051,
8376
},
84-
runtime: {
85-
router: true,
86-
},
87-
plugins: [
88-
appTools(),
89-
moduleFederationPlugin(),
90-
],
77+
plugins: [appTools(), moduleFederationPlugin()],
9178
});
9279
```
9380

@@ -190,19 +177,13 @@ export default defineConfig({
190177
server: {
191178
port: 3051,
192179
},
193-
runtime: {
194-
router: true,
195-
},
196180
output: {
197181
// Now this configuration is only used in the local when you run modern serve command.
198182
// If you want to deploy the application to the platform, use your own domain name.
199183
// Module federation will automatically write it to mf-manifest.json, which influences consumer to fetch remoteEntry.js.
200184
assetPrefix: 'http://127.0.0.1:3051',
201185
},
202-
plugins: [
203-
appTools(),
204-
moduleFederationPlugin(),
205-
],
186+
plugins: [appTools(), moduleFederationPlugin()],
206187
});
207188
```
208189

packages/document/docs/zh/tutorials/first-app/c08-entries.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: 添加应用入口
33
---
4+
45
# 添加应用入口
56

67
上一个章节中,我们基本完成了联系人列表应用的开发,介绍了 Modern.js 中部分功能的用法,以及推荐的最佳实践。
@@ -97,10 +98,6 @@ mv src/myapp src/contacts
9798
import { appTools, defineConfig } from '@modern-js/app-tools';
9899

99100
export default defineConfig({
100-
runtime: {
101-
router: true,
102-
state: true,
103-
},
104101
server: {
105102
ssr: true,
106103
ssrByEntries: {

packages/server/core/tests/helpers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export function getDefaultConfig() {
77
source: {},
88
tools: {},
99
server: {},
10-
runtime: {},
1110
bff: {},
1211
dev: {},
1312
security: {},

packages/server/server/tests/mock.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ function getDefaultConfig() {
1313
source: {},
1414
tools: {},
1515
server: {},
16-
runtime: {},
1716
bff: {},
1817
dev: {},
1918
security: {},

0 commit comments

Comments
 (0)