Skip to content

Commit 6859026

Browse files
1360151219huhu-198matto491360151219
authored
Fix ci bug (#23)
* fix: 修复ci构建问题 * fix: 升级node版本 * fix: 重新构建 * fix: 💚 ci * fix: ci * fix: prettier parser * feat: git page切换Hash路由 --------- Co-authored-by: huhu-198 <[email protected]> Co-authored-by: matto <[email protected]> Co-authored-by: 1360151219 <[email protected]>
1 parent f19169b commit 6859026

File tree

8 files changed

+10
-11
lines changed

8 files changed

+10
-11
lines changed

.prettierrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/.DS_Store

6 KB
Binary file not shown.

packages/demo/.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"parser": "babel",
23
"singleQuote": true,
34
"printWidth": 120
45
}

packages/demo/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ReactDom from 'react-dom/client';
2-
import React, { ReactNode } from 'react';
3-
import { BrowserRouter as Router, useLocation, useRoutes } from 'react-router-dom';
2+
import React from 'react';
3+
import { HashRouter, useLocation, useRoutes } from 'react-router-dom';
44
import router from '@/routers';
55
import './index.scss';
66
import { useLayoutEffect } from 'react';
@@ -18,9 +18,10 @@ const AutoScrollToTop: React.FC<{ children: React.ReactElement }> = ({ children
1818
};
1919

2020
ReactDom.createRoot(document.getElementById('root') as HTMLElement).render(
21-
<Router>
21+
<HashRouter>
2222
<AutoScrollToTop>
2323
<App />
2424
</AutoScrollToTop>
25-
</Router>
25+
</HashRouter>
26+
2627
);

packages/demo/loaders/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const prettier = require('prettier');
22
function format(code) {
33
return prettier.format(code, {
4+
parser: 'babel',
45
semi: true,
56
singleQuote: true,
67
printWidth: 120,

packages/design-icon/.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"singleQuote": true,
3+
"parser": "babel",
34
"printWidth": 120
45
}

packages/design-props/.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"parser": "babel",
23
"singleQuote": true,
34
"printWidth": 120
45
}

packages/design/.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"parser": "babel",
23
"singleQuote": true,
34
"printWidth": 120
45
}

0 commit comments

Comments
 (0)