@modern-js/plugin-ssg 1.2.6 → 1.2.9

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,38 @@
1
1
  # @modern-js/plugin-ssg
2
2
 
3
+ ## 1.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 04ae5262: chore: bump @modern-js/utils to v1.4.1 in dependencies
8
+ - 60f7d8bf: feat: add tests dir to npmignore
9
+ - Updated dependencies [b8599d09]
10
+ - Updated dependencies [60f7d8bf]
11
+ - Updated dependencies [3bf4f8b0]
12
+ - @modern-js/utils@1.5.0
13
+
14
+ ## 1.2.8
15
+
16
+ ### Patch Changes
17
+
18
+ - 046e58aa: fix: plugin-analyze and plugin-ssg should not import method from core
19
+ - Updated dependencies [77ff9754]
20
+ - Updated dependencies [d2d1d6b2]
21
+ - Updated dependencies [07a4887e]
22
+ - Updated dependencies [ea2ae711]
23
+ - Updated dependencies [17d0cc46]
24
+ - Updated dependencies [d2d1d6b2]
25
+ - @modern-js/utils@1.4.0
26
+
27
+ ## 1.2.7
28
+
29
+ ### Patch Changes
30
+
31
+ - bebb39b6: chore: improve devDependencies and peerDependencies
32
+ - 132f7b53: feat: move config declarations to @modern-js/core
33
+ - Updated dependencies [132f7b53]
34
+ - @modern-js/utils@1.3.7
35
+
3
36
  ## 1.2.6
4
37
 
5
38
  ### Patch Changes
@@ -35,7 +35,6 @@ export default (() => ({
35
35
  };
36
36
  },
37
37
 
38
- // eslint-disable-next-line max-statements
39
38
  async afterBuild() {
40
39
  const resolvedConfig = api.useResolvedConfigContext();
41
40
  const appContext = api.useAppContext();
@@ -169,7 +168,7 @@ export default (() => ({
169
168
  ssgRoute.isSSR = false;
170
169
  ssgRoute.output = formatOutput(ssgRoute.output);
171
170
  });
172
- const htmlAry = await createServer(ssgRoutes, pageRoutes, apiRoutes, resolvedConfig, appDirectory); // write to dist file
171
+ const htmlAry = await createServer(api, ssgRoutes, pageRoutes, apiRoutes, resolvedConfig, appDirectory); // write to dist file
173
172
 
174
173
  writeHtmlFile(htmlAry, ssgRoutes, buildDir); // format route info, side effect
175
174
 
@@ -1,10 +1,9 @@
1
1
  import childProcess from 'child_process';
2
2
  import path from 'path';
3
3
  import { logger } from '@modern-js/utils';
4
- import { useAppContext } from '@modern-js/core';
5
4
  import { openRouteSSR } from "../libs/util";
6
5
  import { CLOSE_SIGN } from "./consts";
7
- export const createServer = (ssgRoutes, pageRoutes, apiRoutes, options, appDirectory) => new Promise((resolve, reject) => {
6
+ export const createServer = (api, ssgRoutes, pageRoutes, apiRoutes, options, appDirectory) => new Promise((resolve, reject) => {
8
7
  // this side of the shallow copy of a route for subsequent render processing, to prevent the modification of the current field
9
8
  // manually enable the server-side rendering configuration for all routes that require SSG
10
9
  const backup = openRouteSSR(pageRoutes);
@@ -13,7 +12,7 @@ export const createServer = (ssgRoutes, pageRoutes, apiRoutes, options, appDirec
13
12
  cwd: appDirectory,
14
13
  silent: true
15
14
  });
16
- const appContext = useAppContext();
15
+ const appContext = api.useAppContext();
17
16
  const serverPlugins = appContext.plugins.filter(p => p.server).map(p => p.server);
18
17
  const plugins = serverPlugins.map(p => p.name);
19
18
  cp.send(JSON.stringify({
@@ -1 +0,0 @@
1
- import '@modern-js/core';
@@ -52,7 +52,6 @@ var _default = () => ({
52
52
  };
53
53
  },
54
54
 
55
- // eslint-disable-next-line max-statements
56
55
  async afterBuild() {
57
56
  const resolvedConfig = api.useResolvedConfigContext();
58
57
  const appContext = api.useAppContext();
@@ -187,7 +186,7 @@ var _default = () => ({
187
186
  ssgRoute.isSSR = false;
188
187
  ssgRoute.output = (0, _util.formatOutput)(ssgRoute.output);
189
188
  });
190
- const htmlAry = await (0, _server.createServer)(ssgRoutes, pageRoutes, apiRoutes, resolvedConfig, appDirectory); // write to dist file
189
+ const htmlAry = await (0, _server.createServer)(api, ssgRoutes, pageRoutes, apiRoutes, resolvedConfig, appDirectory); // write to dist file
191
190
 
192
191
  (0, _output.writeHtmlFile)(htmlAry, ssgRoutes, buildDir); // format route info, side effect
193
192
 
@@ -11,15 +11,13 @@ var _path = _interopRequireDefault(require("path"));
11
11
 
12
12
  var _utils = require("@modern-js/utils");
13
13
 
14
- var _core = require("@modern-js/core");
15
-
16
14
  var _util = require("../libs/util");
17
15
 
18
16
  var _consts = require("./consts");
19
17
 
20
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
19
 
22
- const createServer = (ssgRoutes, pageRoutes, apiRoutes, options, appDirectory) => new Promise((resolve, reject) => {
20
+ const createServer = (api, ssgRoutes, pageRoutes, apiRoutes, options, appDirectory) => new Promise((resolve, reject) => {
23
21
  // this side of the shallow copy of a route for subsequent render processing, to prevent the modification of the current field
24
22
  // manually enable the server-side rendering configuration for all routes that require SSG
25
23
  const backup = (0, _util.openRouteSSR)(pageRoutes);
@@ -30,7 +28,7 @@ const createServer = (ssgRoutes, pageRoutes, apiRoutes, options, appDirectory) =
30
28
  silent: true
31
29
  });
32
30
 
33
- const appContext = (0, _core.useAppContext)();
31
+ const appContext = api.useAppContext();
34
32
  const serverPlugins = appContext.plugins.filter(p => p.server).map(p => p.server);
35
33
  const plugins = serverPlugins.map(p => p.name);
36
34
  cp.send(JSON.stringify({
@@ -1,3 +0,0 @@
1
- "use strict";
2
-
3
- require("@modern-js/core");
@@ -1,5 +1,5 @@
1
1
  import { ServerRoute as ModernRoute } from '@modern-js/types';
2
2
  import { compile } from '../server/prerender';
3
- import { RouteOptions, SsgRoute } from '../types';
3
+ import { SSGRouteOptions, SsgRoute } from '../types';
4
4
  export declare function makeRender(ssgRoutes: SsgRoute[], render: ReturnType<typeof compile>, port: number): Promise<string>[];
5
- export declare function makeRoute(baseRoute: ModernRoute, route: string | RouteOptions, headers?: Record<string, any>): SsgRoute;
5
+ export declare function makeRoute(baseRoute: ModernRoute, route: string | SSGRouteOptions, headers?: Record<string, any>): SsgRoute;
@@ -1,5 +1,5 @@
1
1
  import { ServerRoute as ModernRoute } from '@modern-js/types';
2
- import { EntryPoint, MultiEntryOptions, SSG, SsgRoute } from '../types';
2
+ import { SsgRoute, SSGConfig, EntryPoint, SSGMultiEntryOptions } from '../types';
3
3
  export declare function formatOutput(filename: string): string;
4
4
  export declare function formatPath(str: string): string;
5
5
  export declare function isDynamicUrl(url: string): boolean;
@@ -8,7 +8,7 @@ export declare function getOutput(route: SsgRoute, base: string, agreed?: boolea
8
8
  export declare const readJSONSpec: (dir: string) => ModernRoute[];
9
9
  export declare const writeJSONSpec: (dir: string, routes: ModernRoute[]) => void;
10
10
  export declare const replaceWithAlias: (base: string, filePath: string, alias: string) => string;
11
- export declare const standardOptions: (ssgOptions: SSG, entrypoints: EntryPoint[]) => false | MultiEntryOptions;
11
+ export declare const standardOptions: (ssgOptions: SSGConfig, entrypoints: EntryPoint[]) => false | SSGMultiEntryOptions;
12
12
  export declare const openRouteSSR: (routes: ModernRoute[]) => {
13
13
  isSSR: boolean;
14
14
  bundle: string;
@@ -1,4 +1,4 @@
1
- import { NormalizedConfig } from '@modern-js/core';
1
+ import type { NormalizedConfig, PluginAPI } from '@modern-js/core';
2
2
  import { ServerRoute as ModernRoute } from '@modern-js/types';
3
3
  import { SsgRoute } from '../types';
4
- export declare const createServer: (ssgRoutes: SsgRoute[], pageRoutes: ModernRoute[], apiRoutes: ModernRoute[], options: NormalizedConfig, appDirectory: string) => Promise<string[]>;
4
+ export declare const createServer: (api: PluginAPI, ssgRoutes: SsgRoute[], pageRoutes: ModernRoute[], apiRoutes: ModernRoute[], options: NormalizedConfig, appDirectory: string) => Promise<string[]>;
@@ -1,5 +1,6 @@
1
- import { ServerRoute as ModernRoute } from '@modern-js/types';
2
- import '@modern-js/core';
1
+ import type { ServerRoute as ModernRoute } from '@modern-js/types';
2
+ import type { SSGConfig, SSGRouteOptions, SSGMultiEntryOptions, SSGSingleEntryOptions } from '@modern-js/core';
3
+ export type { SSGConfig, SSGRouteOptions, SSGMultiEntryOptions, SSGSingleEntryOptions };
3
4
  export declare type AgreedRoute = {
4
5
  path: string;
5
6
  component: string;
@@ -17,24 +18,6 @@ export declare type SsgRoute = ModernRoute & {
17
18
  output: string;
18
19
  headers?: Record<string, string>;
19
20
  };
20
- export declare type RouteOptions = string | {
21
- url: string;
22
- output?: string;
23
- params?: Record<string, any>[];
24
- headers?: Record<string, any>;
25
- };
26
- export declare type SingleEntryOptions = boolean | {
27
- preventDefault?: string[];
28
- headers?: Record<string, any>;
29
- routes?: RouteOptions[];
30
- };
31
- export declare type MultiEntryOptions = Record<string, SingleEntryOptions>;
32
- export declare type SSG = boolean | SingleEntryOptions | MultiEntryOptions | ((entryName: string) => SingleEntryOptions);
33
21
  export declare type ExtendOutputConfig = {
34
- ssg: SSG;
35
- };
36
- declare module '@modern-js/core' {
37
- interface OutputConfig {
38
- ssg?: SSG;
39
- }
40
- }
22
+ ssg: SSGConfig;
23
+ };
package/jest.config.js CHANGED
@@ -2,7 +2,6 @@ const sharedConfig = require('@scripts/jest-config');
2
2
 
3
3
  /** @type {import('@jest/types').Config.InitialOptions} */
4
4
  module.exports = {
5
- // eslint-disable-next-line node/no-unsupported-features/es-syntax
6
5
  ...sharedConfig,
7
6
  rootDir: __dirname,
8
7
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.6",
14
+ "version": "1.2.9",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -55,15 +55,15 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@babel/runtime": "^7",
58
- "@modern-js/utils": "^1.3.5",
58
+ "@modern-js/utils": "^1.5.0",
59
59
  "node-mocks-http": "^1.10.1",
60
60
  "normalize-path": "^3.0.0",
61
61
  "portfinder": "^1.0.28",
62
62
  "react-router-dom": "^5.2.1"
63
63
  },
64
64
  "devDependencies": {
65
- "@modern-js/types": "^1.3.5",
66
- "@modern-js/prod-server": "^1.0.4",
65
+ "@modern-js/types": "^1.5.0",
66
+ "@modern-js/prod-server": "^1.1.1",
67
67
  "@types/jest": "^26",
68
68
  "@types/node": "^14",
69
69
  "@types/react": "^17",
@@ -71,7 +71,7 @@
71
71
  "@types/react-router": "^5.1.16",
72
72
  "@types/react-router-dom": "^5.1.8",
73
73
  "typescript": "^4",
74
- "@modern-js/core": "^1.5.0",
74
+ "@modern-js/core": "1.8.0",
75
75
  "@scripts/build": "0.0.0",
76
76
  "jest": "^27",
77
77
  "@scripts/jest-config": "0.0.0"
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- extends: ['@modern-js'],
3
- parserOptions: {
4
- project: require.resolve('./tsconfig.json'),
5
- },
6
- };
@@ -1,8 +0,0 @@
1
- import plugin from '../src';
2
-
3
- describe('plugin-ssg', () => {
4
- it('default', () => {
5
- expect(plugin).toBeDefined();
6
- expect(plugin().name).toBe('@modern-js/plugin-ssg');
7
- });
8
- });
package/tests/lib.test.ts DELETED
@@ -1,104 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
- import { ServerRoute as ModernRoute } from '@modern-js/types';
4
- import { exist, replaceRoute } from '../src/libs/replace';
5
- import { makeRoute } from '../src/libs/make';
6
-
7
- describe('test functional function', () => {
8
- it('should check route exist correctly', () => {
9
- const pageRoutes: ModernRoute[] = JSON.parse(
10
- fs.readFileSync(path.join(__dirname, 'material/lib.route.json'), 'utf-8'),
11
- ).routes;
12
- const testRoutes = [
13
- {
14
- urlPath: '/lib/entry',
15
- entryName: 'entry',
16
- result: 0,
17
- },
18
- {
19
- urlPath: '/lib/home',
20
- entryName: 'home1',
21
- result: -1,
22
- },
23
- {
24
- urlPath: '/lib/home1',
25
- entryName: 'home',
26
- result: -1,
27
- },
28
- {
29
- urlPath: '/lib/user',
30
- entryName: 'mobile',
31
- result: 2,
32
- },
33
- {
34
- urlPath: '/lib/user',
35
- entryName: 'pc',
36
- result: 3,
37
- },
38
- ];
39
- testRoutes.forEach(route => {
40
- expect(exist(route as any, pageRoutes)).toBe(route.result);
41
- });
42
- });
43
-
44
- it('should replace route correctly', () => {
45
- const matrial = JSON.parse(
46
- fs.readFileSync(
47
- path.join(__dirname, 'material/replace.route.json'),
48
- 'utf-8',
49
- ),
50
- );
51
-
52
- const { origin, ssg, final } = matrial;
53
- const result = replaceRoute(ssg, origin);
54
-
55
- expect(result).toEqual(final);
56
- });
57
-
58
- it('shoule generate route correctly', () => {
59
- const baseRoute: ModernRoute = {
60
- urlPath: '/foo',
61
- isSPA: true,
62
- isSSR: false,
63
- entryName: 'foo',
64
- isApi: false,
65
- bundle: '',
66
- entryPath: 'html/foo/index.html',
67
- };
68
-
69
- const route1 = makeRoute(baseRoute, '/baz');
70
- expect(route1.urlPath).toBe('/foo/baz');
71
- expect(route1.urlPath).toBe('/foo/baz');
72
-
73
- const route2 = makeRoute(baseRoute, { url: '/baz' });
74
- expect(route2.urlPath).toBe('/foo/baz');
75
- expect(route2.output).toBe(path.normalize('html/foo/baz'));
76
-
77
- const route3 = makeRoute(baseRoute, {
78
- url: '/baz',
79
- output: 'html/baz.html',
80
- });
81
- expect(route3.output).toBe(path.normalize('html/baz.html'));
82
-
83
- const route4 = makeRoute(
84
- baseRoute,
85
- {
86
- url: '/baz',
87
- },
88
- { ua: 'mobile' },
89
- );
90
- expect(route4.headers).toEqual({ ua: 'mobile' });
91
-
92
- const route5 = makeRoute(
93
- baseRoute,
94
- {
95
- url: '/baz',
96
- headers: {
97
- ua: 'pc',
98
- },
99
- },
100
- { ua: 'mobile' },
101
- );
102
- expect(route5.headers).toEqual({ ua: 'pc' });
103
- });
104
- });
@@ -1,24 +0,0 @@
1
- {
2
- "routes": [
3
- {
4
- "urlPath": "/lib/entry",
5
- "entryPath": "html/entry/index.html",
6
- "entryName": "entry"
7
- },
8
- {
9
- "urlPath": "/lib/home",
10
- "entryPath": "html/home/index.html",
11
- "entryName": "home"
12
- },
13
- {
14
- "urlPath": "/lib/user",
15
- "entryPath": "html/mobile/index.html",
16
- "entryName": "mobile"
17
- },
18
- {
19
- "urlPath": "/lib/user",
20
- "entryPath": "html/mobile/index.html",
21
- "entryName": "pc"
22
- }
23
- ]
24
- }
@@ -1,45 +0,0 @@
1
- {
2
- "origin": [{
3
- "urlPath": "/lib/entry",
4
- "entryPath": "html/entry/index.html",
5
- "entryName": "entry"
6
- }, {
7
- "urlPath": "/lib/home",
8
- "entryPath": "html/home/index.html",
9
- "entryName": "home"
10
- }, {
11
- "urlPath": "/lib/mobile",
12
- "entryPath": "html/mobile/index.html",
13
- "entryName": "mobile"
14
- }],
15
- "ssg": [{
16
- "urlPath": "/lib/entry",
17
- "entryPath": "html/entry/index.html",
18
- "entryName": "entry"
19
- }, {
20
- "urlPath": "/lib/home",
21
- "entryPath": "html/home.html",
22
- "entryName": "home"
23
- }, {
24
- "urlPath": "/lib/pc",
25
- "entryPath": "html/pc/index.html",
26
- "entryName": "pc"
27
- }],
28
- "final": [{
29
- "urlPath": "/lib/entry",
30
- "entryPath": "html/entry/index.html",
31
- "entryName": "entry"
32
- }, {
33
- "urlPath": "/lib/home",
34
- "entryPath": "html/home.html",
35
- "entryName": "home"
36
- }, {
37
- "urlPath": "/lib/mobile",
38
- "entryPath": "html/mobile/index.html",
39
- "entryName": "mobile"
40
- }, {
41
- "urlPath": "/lib/pc",
42
- "entryPath": "html/pc/index.html",
43
- "entryName": "pc"
44
- }]
45
- }
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "@modern-js/tsconfig/base",
3
- "compilerOptions": {
4
- "declaration": false,
5
- "jsx": "preserve",
6
- "baseUrl": "./",
7
- "paths": {},
8
- "esModuleInterop": true
9
- }
10
- }
@@ -1,157 +0,0 @@
1
- import {
2
- formatOutput,
3
- formatPath,
4
- isDynamicUrl,
5
- getUrlPrefix,
6
- getOutput,
7
- replaceWithAlias,
8
- standardOptions,
9
- openRouteSSR,
10
- } from '../src/libs/util';
11
-
12
- describe('test ssg util function', () => {
13
- it('should return format path correctly', () => {
14
- const f1 = formatPath('foo');
15
- expect(f1).toBe('/foo');
16
-
17
- const f2 = formatPath('/foo/');
18
- expect(f2).toBe('/foo');
19
-
20
- const f3 = formatPath('foo/');
21
- expect(f3).toBe('/foo');
22
-
23
- const f4 = formatPath('./foo');
24
- expect(f4).toBe('/foo');
25
-
26
- const f5 = formatPath('/');
27
- expect(f5).toBe('/');
28
-
29
- const f6 = formatPath(1 as any);
30
- expect(f6).toBe(1);
31
- });
32
-
33
- it('should detect dynamic url correctly', () => {
34
- const d1 = isDynamicUrl('/:foo');
35
- expect(d1).toBe(true);
36
-
37
- const d2 = isDynamicUrl('/foo');
38
- expect(d2).toBe(false);
39
- });
40
-
41
- it('should get url base correctly', () => {
42
- const r1: any = { entryName: 'main' };
43
- expect(getUrlPrefix(r1, '/')).toBe('');
44
- expect(getUrlPrefix(r1, '/base')).toBe('/base');
45
-
46
- const r2: any = { entryName: 'home' };
47
- expect(getUrlPrefix(r2, '/')).toBe('/home');
48
- expect(getUrlPrefix(r2, '/base')).toBe('/base/home');
49
- });
50
-
51
- it('should get output correctly', () => {
52
- const r1: any = { urlPath: '/foo/a' };
53
- expect(getOutput(r1, '', true)).toBe('foo/a');
54
- expect(getOutput(r1, '/foo', true)).toBe('a');
55
- expect(getOutput(r1, '/foo/a', true)).toBe('');
56
-
57
- const r2 = {
58
- urlPath: '/foo/a',
59
- output: './foo/a.html',
60
- };
61
- expect(getOutput(r2 as any, '', false)).toBe(r2.output);
62
- expect(getOutput(r2 as any, '/foo', true)).toBe(r2.output);
63
- });
64
-
65
- it('should return format output correctly', () => {
66
- const entryPath1 = '/base/home/index.html';
67
- expect(formatOutput(entryPath1)).toBe(entryPath1);
68
-
69
- const entryPath2 = '/base/home';
70
- expect(formatOutput(entryPath2)).toBe(entryPath1);
71
- });
72
-
73
- it('should replace alias correctly', () => {
74
- expect(replaceWithAlias('/src', '/src/app.js', '@src')).toBe('@src/app.js');
75
- });
76
-
77
- // eslint-disable-next-line max-statements
78
- it('should starndar user config correctly', () => {
79
- const opt0 = standardOptions(false, []);
80
- expect(opt0).toBeFalsy();
81
-
82
- const opt1 = standardOptions(true, [{ entryName: 'main', entry: '' }]);
83
- expect(opt1).toEqual({ main: true });
84
-
85
- const opt2 = standardOptions(true, [
86
- { entryName: 'main', entry: '' },
87
- { entryName: 'home', entry: '' },
88
- ]);
89
- expect(opt2).toEqual({ main: true, home: true });
90
-
91
- const opt3 = standardOptions(true, [
92
- { entryName: 'main', entry: '' },
93
- { entryName: 'home', entry: '' },
94
- ]);
95
- expect(opt3).toEqual({ main: true, home: true });
96
-
97
- // single entry, object config
98
- const ssg1 = {
99
- routes: ['/foo', { url: '/baz' }],
100
- };
101
- const opt4 = standardOptions(ssg1, [{ entryName: 'main', entry: '' }]);
102
- expect(opt4).toEqual({ main: ssg1 });
103
-
104
- // error usage, just test
105
- const ssg2 = {
106
- routes: ['/foo', { url: '/baz' }],
107
- };
108
- const opt5 = standardOptions(ssg2, [
109
- { entryName: 'main', entry: '' },
110
- { entryName: 'home', entry: '' },
111
- ]);
112
- expect(opt5).toEqual(ssg2);
113
-
114
- const ssg3 = {
115
- main: { routes: ['/foo', { url: '/baz' }] },
116
- home: false,
117
- };
118
- const opt6 = standardOptions(ssg3, [
119
- { entryName: 'main', entry: '' },
120
- { entryName: 'home', entry: '' },
121
- ]);
122
- expect(opt6).toEqual(ssg3);
123
-
124
- const ssg4 = () => true;
125
- const opt7 = standardOptions(ssg4, [
126
- { entryName: 'main', entry: '' },
127
- { entryName: 'home', entry: '' },
128
- ]);
129
- expect(opt7).toEqual({ main: true, home: true });
130
-
131
- const ssg5 = (entryName: string) => {
132
- if (entryName === 'main') {
133
- return true;
134
- } else {
135
- return {
136
- routes: ['/foo'],
137
- };
138
- }
139
- };
140
- const opt8 = standardOptions(ssg5, [
141
- { entryName: 'main', entry: '' },
142
- { entryName: 'home', entry: '' },
143
- ]);
144
- expect(opt8).toEqual({ main: true, home: { routes: ['/foo'] } });
145
- });
146
-
147
- it('should get ssr route correctly', () => {
148
- const ssrRoutes = openRouteSSR([
149
- {
150
- isSSR: false,
151
- },
152
- ] as any);
153
-
154
- expect(ssrRoutes[0].isSSR).toBeTruthy();
155
- expect(ssrRoutes[0].bundle).toBeDefined();
156
- });
157
- });