模版中web组件路径调整

This commit is contained in:
wkj 2024-04-18 18:13:57 +08:00
parent 2980a10287
commit 3b1ae9a27b
13 changed files with 5 additions and 20 deletions

View File

@ -1,7 +1,6 @@
import initialize from '@project/initialize'; import initialize from '@project/initialize';
import { createComponent } from '@project/page'; import { createComponent } from '@project/page';
import { host } from './configuration'; const { features } = initialize();
const { features } = initialize('native', host);
Object.assign(global, { Object.assign(global, {
features, features,

View File

@ -1,7 +1,4 @@
const { initialize } = require('@xuchangzju/oak-cli/lib/server/initialize'); const { initialize } = require('@xuchangzju/oak-cli/lib/server/initialize');
const {
BackendRuntimeContext,
} = require('../lib/context/BackendRuntimeContext');
const pwd = process.cwd(); const pwd = process.cwd();

View File

@ -8,9 +8,7 @@ import {
OakServerProxyException, OakServerProxyException,
} from 'oak-domain/lib/types/Exception'; } from 'oak-domain/lib/types/Exception';
import { ECode } from 'oak-frontend-base/es/types/ErrorPage'; import { ECode } from 'oak-frontend-base/es/types/ErrorPage';
const ErrorPage = lazy( const ErrorPage = lazy(() => import('oak-frontend-base/es/components/errorPage'));
() => import('oak-frontend-base/es/components/errorPage')
);
interface ErrorProps { interface ErrorProps {
error: any; error: any;

View File

@ -2,7 +2,7 @@ import React from 'react';
import { Routes, Route, Outlet, useLocation } from 'react-router-dom'; import { Routes, Route, Outlet, useLocation } from 'react-router-dom';
import { IRouter, IBrowserRouterProps, IMeta } from './types/router'; import { IRouter, IBrowserRouterProps, IMeta } from './types/router';
import routers from './app/routers'; import routers from './app/routers';
import Loading from './components/Loading'; import Loading from './app/components/Loading';
import useFeatures from '@project/hooks/useFeatures'; import useFeatures from '@project/hooks/useFeatures';
type TRenderRoutes = ( type TRenderRoutes = (

View File

@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Routes, Route, Outlet, useLocation } from 'react-router-dom'; import { Routes, Route, Outlet, useLocation } from 'react-router-dom';
import Header from '../../components/consoleHeader'; import Header from '../../components/header';
import Styles from './web.pc.module.less'; import Styles from './web.pc.module.less';
import useFeatures from '@project/hooks/useFeatures'; import useFeatures from '@project/hooks/useFeatures';
// import Menu from '@project/components/console/menu'; // import Menu from '@project/components/console/menu';

View File

@ -1,5 +0,0 @@
"use oak router builder"; // 这行备注说明是用oak的router builder来生成allRouters
import React from 'react';
import { IRouter } from '../../types/router';
let allRouters: IRouter[] = [];
export default allRouters;

View File

@ -1,12 +1,8 @@
import initialize from '@project/initialize'; import initialize from '@project/initialize';
import { createComponent } from '@project/page'; import { createComponent } from '@project/page';
import { host } from './configuration';
import { getAppType } from './utils/env';
const appType = getAppType(); const { features } = initialize();
const { features } = initialize(appType, host);
Object.assign(global, { Object.assign(global, {
features, features,