@moneko/core 3.32.0 → 3.32.1

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.
@@ -1,8 +1,5 @@
1
- import{CONFIG as e}from"../config.mjs";import{APPTYPE as t,frameworkVersion as r,isDev as o}from"../process-env.mjs";let n=r<18,a="hash"===e.routerMode,c=a?"HashRouter":"BrowserRouter",p=e.strict?"StrictMode":"",s=`<${p}>
2
- <${c} basename={${a?"/":"basename"}} window={window}>
3
- <App />
4
- </${c}>
5
- </${p}>`,m=`import React, { StrictMode, type ReactElement } from 'react';
1
+ import{CONFIG as e}from"../config.mjs";import{APPTYPE as r,frameworkVersion as t,isDev as o}from"../process-env.mjs";let n=t<18,a="hash"===e.routerMode,c=a?"HashRouter":"BrowserRouter",p=e.strict?"StrictMode":"",s=`<${p}><${c} basename={${a?"/":"basename"}} window={window}><ErrorBoundary><App /></ErrorBoundary></${c}></${p}>`,m=`import React, { StrictMode, type ReactElement } from 'react';
2
+ import { ErrorBoundary } from '@moneko/react';
6
3
  import routes from '@app/routes';
7
4
  import ReactDOM from '${n?"react-dom":"react-dom/client"}';
8
5
  import { ${c}, useRoutes } from 'react-router-dom';
@@ -23,7 +20,7 @@ export function App(props: RenderAppProps) {
23
20
  function renderApp(props: RenderAppProps = {}) {
24
21
  const { container, basename = "${e.basename}", language, ...args } = props;
25
22
  const _container = container?.querySelector('#root') || document.getElementById('root');
26
- ${"micro"===t?"window.mainApp = { ...args, container: _container as HTMLElement };":""}
23
+ ${"micro"===r?"window.mainApp = { ...args, container: _container as HTMLElement };":""}
27
24
  ${n?`ReactDOM.${o?"render":"hydrate"}(${s}, _container);return () => ReactDOM.unmountComponentAtNode(_container as Element);`:`const instance = ReactDOM.createRoot(_container as HTMLElement);instance.render(${s});return instance.unmount;`}
28
25
  }
29
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.32.0",
3
+ "version": "3.32.1",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",