Skip to content

Commit 7e7a154

Browse files
authored
Chore: fix doc site script (#212)
* fix docs script * add comment
1 parent 54d0d68 commit 7e7a154

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/GHPages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Upload artifact
3838
uses: actions/upload-pages-artifact@v1
3939
with:
40-
path: ./build
40+
path: ./build/eslint-plugin-svelte
4141
- name: Deploy to GitHub Pages
4242
id: deployment
4343
uses: actions/deploy-pages@v1

svelte.config.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ fs.writeFileSync(
1919
JSON.stringify({ type: "module" }),
2020
)
2121

22+
const outDir = path.join(dirname, "build/eslint-plugin-svelte")
23+
2224
/** @type {import('@sveltejs/kit').Config} */
2325
const config = {
2426
compilerOptions: {
@@ -31,8 +33,8 @@ const config = {
3133
},
3234
adapter: ghpagesAdapter({
3335
// default options are shown
34-
pages: "build",
35-
assets: "build",
36+
pages: outDir,
37+
assets: outDir,
3638
}),
3739
prerender: {
3840
default: true,

vite.config.mts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ const config: UserConfig = {
6565
acorn: path.join(dirname, "./node_modules/acorn/dist/acorn.js"),
6666
},
6767
},
68+
ssr: {
69+
// vite-plugin-svelte recognizes svelte-eslint-parser as a library that runs on svelte.
70+
// This confuses the SSR on the Dev server.
71+
// This is the workaround for that.
72+
// https://github.com/sveltejs/vite-plugin-svelte/blob/a1d141e890ac0d1572a46e2bec705aa090236560/packages/vite-plugin-svelte/src/utils/dependencies.ts#L114
73+
external: ["svelte-eslint-parser"],
74+
},
6875
build: {
6976
commonjsOptions: {
7077
ignoreDynamicRequires: true,

0 commit comments

Comments
 (0)