@modern-js/plugin-ssg 2.0.0-beta.1 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @modern-js/plugin-ssg
2
2
 
3
+ ## 2.0.0-beta.2
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9c3e: chore: v2
8
+
9
+ ### Patch Changes
10
+
11
+ - cc971eabfc: refactor: move server plugin load logic in `@modern-js/core`
12
+ refactor:移除在 `@modern-js/core` 中的 server 插件加载逻辑
13
+ - 8b8e1bb571: feat: support nested routes
14
+ feat: 支持嵌套路由
15
+ - Updated dependencies [92f0ead]
16
+ - Updated dependencies [edd1cfb1af]
17
+ - Updated dependencies [cc971eabfc]
18
+ - Updated dependencies [5b9049f2e9]
19
+ - Updated dependencies [92004d1]
20
+ - Updated dependencies [b8bbe036c7]
21
+ - Updated dependencies [d5a31df781]
22
+ - Updated dependencies [dda38c9c3e]
23
+ - Updated dependencies [3bbea92b2a]
24
+ - Updated dependencies [abf3421a75]
25
+ - Updated dependencies [543be9558e]
26
+ - Updated dependencies [14b712da84]
27
+ - @modern-js/utils@2.0.0-beta.2
28
+
3
29
  ## 2.0.0-beta.1
4
30
 
5
31
  ### Major Changes
@@ -45,7 +45,9 @@ export default (() => ({
45
45
  } = resolvedConfig;
46
46
  const {
47
47
  ssg,
48
- path: outputPath
48
+ distPath: {
49
+ root: outputPath
50
+ } = {}
49
51
  } = output;
50
52
  const ssgOptions = Array.isArray(ssg) ? ssg.pop() : ssg;
51
53
  // no ssg configuration, skip ssg render.
@@ -0,0 +1 @@
1
+ export {};
@@ -52,7 +52,9 @@ var _default = () => ({
52
52
  } = resolvedConfig;
53
53
  const {
54
54
  ssg,
55
- path: outputPath
55
+ distPath: {
56
+ root: outputPath
57
+ } = {}
56
58
  } = output;
57
59
  const ssgOptions = Array.isArray(ssg) ? ssg.pop() : ssg;
58
60
  // no ssg configuration, skip ssg render.
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,3 +1,3 @@
1
- import type { CliPlugin } from '@modern-js/core';
2
- declare const _default: () => CliPlugin;
1
+ import type { AppTools, CliPlugin } from '@modern-js/app-tools';
2
+ declare const _default: () => CliPlugin<AppTools>;
3
3
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { ServerRoute as ModernRoute } from '@modern-js/types';
2
- import { ServerConfig } from '@modern-js/core';
2
+ import { ServerUserConfig } from '@modern-js/app-tools';
3
3
  import { SsgRoute, SSGConfig, EntryPoint, SSGMultiEntryOptions, AgreedRoute } from '../types';
4
4
  export declare function formatOutput(filename: string): string;
5
5
  export declare function formatPath(str: string): string;
@@ -9,7 +9,7 @@ export declare function getOutput(route: SsgRoute, base: string, agreed?: boolea
9
9
  export declare const readJSONSpec: (dir: string) => ModernRoute[];
10
10
  export declare const writeJSONSpec: (dir: string, routes: ModernRoute[]) => void;
11
11
  export declare const replaceWithAlias: (base: string, filePath: string, alias: string) => string;
12
- export declare const standardOptions: (ssgOptions: SSGConfig, entrypoints: EntryPoint[], routes: ModernRoute[], server: ServerConfig) => false | SSGMultiEntryOptions;
12
+ export declare const standardOptions: (ssgOptions: SSGConfig, entrypoints: EntryPoint[], routes: ModernRoute[], server: ServerUserConfig) => false | SSGMultiEntryOptions;
13
13
  export declare const openRouteSSR: (routes: ModernRoute[], entries?: string[]) => {
14
14
  isSSR: boolean;
15
15
  bundle: string;
@@ -1,4 +1,4 @@
1
- import type { NormalizedConfig, PluginAPI } from '@modern-js/core';
1
+ import type { AppNormalizedConfig, PluginAPI, AppTools } from '@modern-js/app-tools';
2
2
  import { ServerRoute as ModernRoute } from '@modern-js/types';
3
3
  import { SsgRoute } from '../types';
4
- export declare const createServer: (api: PluginAPI, ssgRoutes: SsgRoute[], pageRoutes: ModernRoute[], apiRoutes: ModernRoute[], options: NormalizedConfig, appDirectory: string) => Promise<string[]>;
4
+ export declare const createServer: (api: PluginAPI<AppTools>, ssgRoutes: SsgRoute[], pageRoutes: ModernRoute[], apiRoutes: ModernRoute[], options: AppNormalizedConfig, appDirectory: string) => Promise<string[]>;
@@ -1,5 +1,5 @@
1
1
  import type { ServerRoute as ModernRoute } from '@modern-js/types';
2
- import type { SSGConfig, SSGRouteOptions, SSGMultiEntryOptions, SSGSingleEntryOptions } from '@modern-js/core';
2
+ import { SSGConfig, SSGRouteOptions, SSGMultiEntryOptions, SSGSingleEntryOptions } from '@modern-js/app-tools';
3
3
  export type { SSGConfig, SSGRouteOptions, SSGMultiEntryOptions, SSGSingleEntryOptions };
4
4
  export declare type AgreedRoute = {
5
5
  path?: string;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.1",
14
+ "version": "2.0.0-beta.2",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -58,7 +58,7 @@
58
58
  "node-mocks-http": "^1.10.1",
59
59
  "normalize-path": "^3.0.0",
60
60
  "portfinder": "^1.0.28",
61
- "@modern-js/utils": "2.0.0-beta.1"
61
+ "@modern-js/utils": "2.0.0-beta.2"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "react-router-dom": ">=5.1.2"
@@ -75,11 +75,11 @@
75
75
  "react": "^18",
76
76
  "typescript": "^4",
77
77
  "jest": "^27",
78
- "@modern-js/types": "2.0.0-beta.1",
79
- "@modern-js/prod-server": "2.0.0-beta.1",
80
- "@modern-js/core": "2.0.0-beta.1",
81
- "@scripts/build": "2.0.0-beta.1",
82
- "@scripts/jest-config": "2.0.0-beta.1"
78
+ "@modern-js/types": "2.0.0-beta.2",
79
+ "@modern-js/prod-server": "2.0.0-beta.2",
80
+ "@scripts/build": "2.0.0-beta.2",
81
+ "@modern-js/app-tools": "2.0.0-beta.2",
82
+ "@scripts/jest-config": "2.0.0-beta.2"
83
83
  },
84
84
  "sideEffects": false,
85
85
  "modernConfig": {
@@ -92,9 +92,9 @@
92
92
  "access": "public"
93
93
  },
94
94
  "scripts": {
95
- "new": "modern new",
96
- "build": "modern build",
97
- "dev": "modern build --watch",
95
+ "new": "modern-lib new",
96
+ "build": "modern-lib build",
97
+ "dev": "modern-lib build --watch",
98
98
  "test": "jest --passWithNoTests"
99
99
  }
100
100
  }