Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Commit

Permalink
fix: basename order (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
luhc228 authored Aug 30, 2022
1 parent 6fc832f commit c2c697e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ice/src/utils/getRouterBasename.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Config } from '@ice/types';
import type { TaskConfig } from 'build-scripts';

const getRouterBasename = (taskConfig: TaskConfig<Config>, appConfig: AppConfig) => {
return taskConfig?.config?.basename || appConfig?.router?.basename;
return appConfig?.router?.basename ?? taskConfig?.config?.basename ?? '';
};

export default getRouterBasename;
2 changes: 1 addition & 1 deletion packages/ice/templates/core/entry.client.ts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Document from '@/document';

const getRouterBasename = () => {
const appConfig = getAppConfig(app);
return '<%- basename %>' || appConfig?.router?.basename || '';
return appConfig?.router?.basename ?? '<%- basename %>' ?? '';
}

runClientApp({
Expand Down
2 changes: 1 addition & 1 deletion packages/ice/templates/core/entry.server.ts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import routes from './routes';

const getRouterBasename = () => {
const appConfig = runtime.getAppConfig(app);
return '<%- basename %>' || appConfig?.router?.basename || '';
return appConfig?.router?.basename ?? '<%- basename %>' ?? '';
}

const setRuntimeEnv = (renderMode) => {
Expand Down

1 comment on commit c2c697e

@vercel
Copy link

@vercel vercel bot commented on c2c697e Aug 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ice-v3 – ./

ice-v3-ice-v3.vercel.app
ice-v3-git-release-next-ice-v3.vercel.app
ice-v3.vercel.app

Please sign in to comment.