@_tc/template-core 0.0.1-bate.45 → 0.0.1-bate.46

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.
@@ -187,29 +187,34 @@ var VBuildFE = async (input, OperatingEnv) => {
187
187
  name: getChunkName("__nm"),
188
188
  test: generatePathReg("node_modules"),
189
189
  maxSize: 5e5,
190
+ minShareCount: 2,
190
191
  priority: 1
191
192
  },
192
193
  {
193
194
  name: getChunkName("r"),
194
195
  test: generatePathReg("node_modules", "react"),
196
+ minShareCount: 2,
195
197
  maxSize: 5e5,
196
198
  priority: 5
197
199
  },
198
200
  {
199
201
  name: getChunkName("r-d"),
200
202
  test: generatePathReg("node_modules", "react-dom"),
203
+ minShareCount: 2,
201
204
  maxSize: 2e5,
202
205
  priority: 10
203
206
  },
204
207
  {
205
208
  name: getChunkName("r-r-d"),
206
209
  test: generatePathReg("node_modules", "react-router-dom"),
210
+ minShareCount: 2,
207
211
  maxSize: 5e5,
208
212
  priority: 10
209
213
  },
210
214
  {
211
215
  name: getChunkName("ajv"),
212
216
  test: generatePathReg("node_modules", "ajv"),
217
+ minShareCount: 2,
213
218
  maxSize: 2e5,
214
219
  priority: 10
215
220
  },
@@ -182,29 +182,34 @@ var VBuildFE = async (input, OperatingEnv) => {
182
182
  name: getChunkName("__nm"),
183
183
  test: generatePathReg("node_modules"),
184
184
  maxSize: 5e5,
185
+ minShareCount: 2,
185
186
  priority: 1
186
187
  },
187
188
  {
188
189
  name: getChunkName("r"),
189
190
  test: generatePathReg("node_modules", "react"),
191
+ minShareCount: 2,
190
192
  maxSize: 5e5,
191
193
  priority: 5
192
194
  },
193
195
  {
194
196
  name: getChunkName("r-d"),
195
197
  test: generatePathReg("node_modules", "react-dom"),
198
+ minShareCount: 2,
196
199
  maxSize: 2e5,
197
200
  priority: 10
198
201
  },
199
202
  {
200
203
  name: getChunkName("r-r-d"),
201
204
  test: generatePathReg("node_modules", "react-router-dom"),
205
+ minShareCount: 2,
202
206
  maxSize: 5e5,
203
207
  priority: 10
204
208
  },
205
209
  {
206
210
  name: getChunkName("ajv"),
207
211
  test: generatePathReg("node_modules", "ajv"),
212
+ minShareCount: 2,
208
213
  maxSize: 2e5,
209
214
  priority: 10
210
215
  },
@@ -1,9 +1,9 @@
1
- import { PropsWithChildren } from "react";
2
- import type { JSX } from "react/jsx-runtime";
3
- import "./main.css";
4
- import "./typing/window";
5
- import { RouterType } from "./widgets/components/Router/type";
6
- import { RouteInfo } from "./widgets/components/Router";
1
+ import { RouteInfo } from './widgets/components/Router';
2
+ import { RouterType } from './widgets/components/Router/type';
3
+ import { PropsWithChildren } from 'react';
4
+ import type { JSX } from 'react/jsx-runtime';
5
+ import './main.css';
6
+ import './typing/window';
7
7
  export declare const initApp: (RootComponent: (props: PropsWithChildren) => JSX.Element, options?: {
8
8
  routes: RouteInfo[];
9
9
  routerType?: RouterType;
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createRoot } from "react-dom/client";
3
- import "./main.css";
4
- import "./typing/window";
5
- import { generateRouter } from "./widgets/components/Router";
2
+ import { generateRouter } from './widgets/components/Router';
3
+ import { createRoot } from 'react-dom/client';
4
+ import './main.css';
5
+ import './typing/window';
6
6
  export const initApp = (RootComponent, options) => {
7
- const root = createRoot(document.getElementById("root"));
8
- const { routerType = "browser", routes: pRoutes = [] } = options ?? {};
7
+ console.log('initApp');
8
+ const root = createRoot(document.getElementById('root'));
9
+ const { routerType = 'browser', routes: pRoutes = [] } = options ?? {};
9
10
  const routes = [...pRoutes];
10
11
  const usedRouter = !!routes.length;
11
12
  let routerDom;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_tc/template-core",
3
- "version": "0.0.1-bate.45",
3
+ "version": "0.0.1-bate.46",
4
4
  "description": "A TypeScript Koa framework template - Monorepo root",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",