Switch runtime to edge

Format code
This commit is contained in:
DefectingCat
2022-11-01 11:44:44 +08:00
parent 502e624d90
commit dcec7044c7
6 changed files with 65 additions and 74 deletions

View File

@ -1,3 +1,4 @@
node_modules node_modules
out out
.next .next
public

View File

@ -1,69 +1,69 @@
.container { .container {
position: absolute; position: absolute;
bottom: 10px; bottom: 10px;
right: 30px; right: 30px;
border-radius: 3px; border-radius: 3px;
background: #000; background: #000;
color: #fff; color: #fff;
font: initial; font: initial;
cursor: initial; cursor: initial;
letter-spacing: initial; letter-spacing: initial;
text-shadow: initial; text-shadow: initial;
text-transform: initial; text-transform: initial;
visibility: initial; visibility: initial;
padding: 7px 10px 8px 10px; padding: 7px 10px 8px 10px;
align-items: center; align-items: center;
box-shadow: 0 11px 40px 0 rgba(0, 0, 0, 0.25), box-shadow: 0 11px 40px 0 rgba(0, 0, 0, 0.25),
0 2px 10px 0 rgba(0, 0, 0, 0.12); 0 2px 10px 0 rgba(0, 0, 0, 0.12);
display: none; display: none;
opacity: 0; opacity: 0;
transition: opacity 0.1s ease, bottom 0.1s ease; transition: opacity 0.1s ease, bottom 0.1s ease;
animation: fade-in 0.1s ease-in-out; animation: fade-in 0.1s ease-in-out;
} }
.container.visible { .container.visible {
display: flex; display: flex;
} }
.container.building { .container.building {
bottom: 20px; bottom: 20px;
opacity: 1; opacity: 1;
} }
.icon-wrapper { .icon-wrapper {
width: 16px; width: 16px;
height: 16px; height: 16px;
} }
.icon-wrapper > svg { .icon-wrapper > svg {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.icon-group { .icon-group {
animation: strokedash 1s ease-in-out both infinite; animation: strokedash 1s ease-in-out both infinite;
} }
@keyframes fade-in { @keyframes fade-in {
from { from {
bottom: 10px; bottom: 10px;
opacity: 0; opacity: 0;
} }
to { to {
bottom: 20px; bottom: 20px;
opacity: 1; opacity: 1;
} }
} }
@keyframes strokedash { @keyframes strokedash {
0% { 0% {
stroke-dasharray: 0 226; stroke-dasharray: 0 226;
} }
80%, 80%,
100% { 100% {
stroke-dasharray: 659 226; stroke-dasharray: 659 226;
} }
} }

View File

@ -1,16 +1,16 @@
.wrapper { .wrapper {
@apply overflow-hidden rounded-lg; @apply overflow-hidden rounded-lg;
@apply mb-8 shadow-lg; @apply mb-8 shadow-lg;
font-size: 16px; font-size: 16px;
/* box-shadow: 0 13px 27px -5px rgb(50 50 93 / 25%), /* box-shadow: 0 13px 27px -5px rgb(50 50 93 / 25%),
0 8px 16px -8px rgb(0 0 0 / 30%), 0 -6px 16px -6px rgb(0 0 0 / 3%); */ 0 8px 16px -8px rgb(0 0 0 / 30%), 0 -6px 16px -6px rgb(0 0 0 / 3%); */
} }
.wrapper pre { .wrapper pre {
margin: unset; margin: unset;
border-radius: unset; border-radius: unset;
} }
.wrapper .loading span { .wrapper .loading span {
margin: unset; margin: unset;
} }

View File

@ -1,16 +1,16 @@
.imageContainer { .imageContainer {
width: 100%; width: 100%;
padding: 10px 0; padding: 10px 0;
position: relative; position: relative;
} }
.imageContainer > span { .imageContainer > span {
position: unset !important; position: unset !important;
} }
.imageContainer .image { .imageContainer .image {
object-fit: contain; object-fit: contain;
width: 100% !important; width: 100% !important;
position: relative !important; position: relative !important;
height: unset !important; height: unset !important;
} }

View File

@ -10,7 +10,7 @@ const nextConfig = {
output: 'standalone', output: 'standalone',
images: isExport ? { unoptimized: true } : {}, images: isExport ? { unoptimized: true } : {},
experimental: { experimental: {
// runtime: 'nodejs', runtime: 'experimental-edge',
largePageDataBytes: 512 * 1000, largePageDataBytes: 512 * 1000,
}, },
compiler: { compiler: {

View File

@ -2,11 +2,7 @@
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"target": "es6", "target": "es6",
"lib": [ "lib": ["dom", "dom.iterable", "esnext"],
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@ -19,14 +15,8 @@
"isolatedModules": true, "isolatedModules": true,
"jsx": "preserve", "jsx": "preserve",
// "typeRoots": ["./types", "./node_modules/@types"], // "typeRoots": ["./types", "./node_modules/@types"],
"incremental": true, "incremental": true
}, },
"include": [ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"next-env.d.ts", "exclude": ["node_modules"]
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
} }