fix: ssg
This commit is contained in:
parent
1dc4d21040
commit
a87a99bd39
@ -9,6 +9,3 @@
|
||||
from = "/*"
|
||||
to = "/index.html"
|
||||
status = 200
|
||||
|
||||
[[plugins]]
|
||||
package = "netlify-plugin-chromium"
|
||||
|
@ -2,7 +2,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --port 3333 --open",
|
||||
"build": "cross-env NODE_ENV=production vite build && presite ./dist"
|
||||
"build": "cross-env NODE_ENV=production vite build && esno scripts/ssg.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify/iconify": "^2.0.0-rc.2",
|
||||
@ -24,6 +24,7 @@
|
||||
"chromium": "^3.0.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^7.14.0",
|
||||
"esno": "^0.3.0",
|
||||
"netlify-plugin-chromium": "^1.1.4",
|
||||
"postcss-nested": "^5.0.1",
|
||||
"presite": "^2.0.1",
|
||||
|
49
pnpm-lock.yaml
generated
49
pnpm-lock.yaml
generated
@ -17,6 +17,7 @@ devDependencies:
|
||||
chromium: 3.0.2
|
||||
cross-env: 7.0.3
|
||||
eslint: 7.14.0
|
||||
esno: 0.3.0
|
||||
netlify-plugin-chromium: 1.1.4
|
||||
postcss-nested: 5.0.1
|
||||
presite: 2.0.1
|
||||
@ -3133,12 +3134,30 @@ packages:
|
||||
node: '>= 0.4'
|
||||
resolution:
|
||||
integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==
|
||||
/esbuild-register/1.1.1_esbuild@0.8.17:
|
||||
dependencies:
|
||||
esbuild: 0.8.17
|
||||
joycon: 2.2.5
|
||||
pirates: 4.0.1
|
||||
source-map-support: 0.5.19
|
||||
strip-json-comments: 3.1.1
|
||||
dev: true
|
||||
peerDependencies:
|
||||
esbuild: ^0.8.0
|
||||
resolution:
|
||||
integrity: sha512-hAPWuaUkPDLXCENc/AigJZaaDCvCkpmghRw8XPyT+rk08JHcIgUrmw1uabbUTfa6B6J9Wo2bFufb01JjbmzcfQ==
|
||||
/esbuild/0.8.16:
|
||||
dev: true
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
resolution:
|
||||
integrity: sha512-HMvPNxDIhEGO/YUh8oO8oxQ1g+ttWz2anUF7NJmQglj2XfJS8zd8mP0Sb2y+jE1SVk3UjD/rYhdsEOFULN9/xw==
|
||||
/esbuild/0.8.17:
|
||||
dev: true
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
resolution:
|
||||
integrity: sha512-ReHap+Iyn5BQF0B8F3xrLwu+j57ri5uDUw2ej9XTPAuFDebYiWwRzBY4jhF610bklveXLbCGim/8/2wQKQlu1w==
|
||||
/escalade/3.1.1:
|
||||
dev: true
|
||||
engines:
|
||||
@ -3396,6 +3415,21 @@ packages:
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-5YubdnPXrlrYAFCKybPuHIAH++PINe1pmKNc5wQRB9HSbqIK1ywAnntE3Wwua4giKu0bjligf1gLF6qxMGOYRA==
|
||||
/esm/3.2.25:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
|
||||
/esno/0.3.0:
|
||||
dependencies:
|
||||
esbuild: 0.8.17
|
||||
esbuild-register: 1.1.1_esbuild@0.8.17
|
||||
esm: 3.2.25
|
||||
dev: true
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-4sF/j8jruQv9jScU8tNkgoDFLjyGxTTB8bmjRmWHyNNygra3WS3X0U1Cc7GuOvfSEjn3NDS57P0LRnzgiupKJg==
|
||||
/espree/6.2.1:
|
||||
dependencies:
|
||||
acorn: 7.4.0
|
||||
@ -4840,6 +4874,12 @@ packages:
|
||||
node: '>= 6.0.0'
|
||||
resolution:
|
||||
integrity: sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==
|
||||
/node-modules-regexp/1.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=
|
||||
/node-releases/1.1.67:
|
||||
dev: true
|
||||
resolution:
|
||||
@ -5204,6 +5244,14 @@ packages:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
|
||||
/pirates/4.0.1:
|
||||
dependencies:
|
||||
node-modules-regexp: 1.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>= 6'
|
||||
resolution:
|
||||
integrity: sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==
|
||||
/pkg-dir/2.0.0:
|
||||
dependencies:
|
||||
find-up: 2.1.0
|
||||
@ -7175,6 +7223,7 @@ specifiers:
|
||||
chromium: ^3.0.2
|
||||
cross-env: ^7.0.3
|
||||
eslint: ^7.14.0
|
||||
esno: ^0.3.0
|
||||
netlify-plugin-chromium: ^1.1.4
|
||||
nprogress: ^0.2.0
|
||||
postcss-nested: ^5.0.1
|
||||
|
5
scripts/ssg.ts
Normal file
5
scripts/ssg.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { execSync } from 'child_process'
|
||||
// @ts-ignore
|
||||
import { path } from 'chromium'
|
||||
|
||||
execSync(`npx cross-env CHROME_PATH="${path}" presite dist`, { stdio: 'inherit' })
|
Loading…
x
Reference in New Issue
Block a user