-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #575 from GraphScope/build-assets
feat: Build single assets
- Loading branch information
Showing
12 changed files
with
105 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,6 @@ yarn-error.log* | |
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
|
||
/public/portal.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,52 @@ | ||
import dynamic from 'next/dynamic'; | ||
import { GlobalSpin } from '@graphscope/studio-components'; | ||
// import dynamic from 'next/dynamic'; | ||
// import { GlobalSpin } from '@graphscope/studio-components'; | ||
|
||
const Apps = dynamic( | ||
() => | ||
import('@graphscope/studio-site').then(module => { | ||
return { | ||
/** 这种写法和 react lazy 就统一了 */ | ||
default: () => { | ||
return ( | ||
<div | ||
style={{ | ||
position: 'absolute', | ||
top: '0px', | ||
left: '0px', | ||
bottom: '0px', | ||
right: '0px', | ||
zIndex: 999, | ||
background: '#fff', | ||
}} | ||
> | ||
<module.default /> | ||
</div> | ||
); | ||
}, | ||
}; | ||
}), | ||
{ | ||
loading: () => <GlobalSpin />, | ||
ssr: false, | ||
}, | ||
); | ||
// const Apps = dynamic( | ||
// () => | ||
// import('@graphscope/studio-site').then(module => { | ||
// return { | ||
// /** 这种写法和 react lazy 就统一了 */ | ||
// default: () => { | ||
// return ( | ||
// <div | ||
// style={{ | ||
// position: 'absolute', | ||
// top: '0px', | ||
// left: '0px', | ||
// bottom: '0px', | ||
// right: '0px', | ||
// zIndex: 999, | ||
// background: '#fff', | ||
// }} | ||
// > | ||
// <module.default /> | ||
// </div> | ||
// ); | ||
// }, | ||
// }; | ||
// }), | ||
// { | ||
// loading: () => <GlobalSpin />, | ||
// ssr: false, | ||
// }, | ||
// ); | ||
|
||
export default Apps; | ||
// export default Apps; | ||
|
||
export default () => { | ||
return ( | ||
<iframe | ||
style={{ | ||
position: 'absolute', | ||
height: '100%', | ||
width: '100%', | ||
top: '0px', | ||
left: '0px', | ||
bottom: '0px', | ||
right: '0px', | ||
zIndex: 999, | ||
}} | ||
src="/portal.html" | ||
></iframe> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
import { Bleed } from 'nextra-theme-docs'; | ||
import Portal from '../../components/Tools/portal'; | ||
|
||
<Portal /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export default { | ||
esm: { output: 'es' }, | ||
cjs: { output: 'lib' }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters