File tree Expand file tree Collapse file tree 3 files changed +25
-20
lines changed Expand file tree Collapse file tree 3 files changed +25
-20
lines changed Original file line number Diff line number Diff line change 20
20
"@shikijs/twoslash" : " ^3.12.2" ,
21
21
"@sindresorhus/slugify" : " ^3.0.0" ,
22
22
"@sveltejs/adapter-static" : " ^3.0.9" ,
23
- "@sveltejs/kit" : " ^2.37.0 " ,
23
+ "@sveltejs/kit" : " ^2.43.1 " ,
24
24
"@sveltejs/vite-plugin-svelte" : " ^6.1.4" ,
25
25
"@types/babel__core" : " ^7.20.5" ,
26
26
"@types/cross-spawn" : " ^6.0.6" ,
57
57
"source-map-js" : " ^1.2.1" ,
58
58
"stylus" : " ^0.64.0" ,
59
59
"svelte" : " ^5.38.6" ,
60
- "svelte-adapter-ghpages" : " 0.2.2" ,
61
60
"twoslash-eslint" : " ^0.3.4" ,
62
61
"twoslash-protocol" : " ^0.3.4" ,
63
62
"util" : " ^0.12.5" ,
Original file line number Diff line number Diff line change 1
- import ghpagesAdapter from 'svelte-adapter-ghpages' ;
2
- import path from 'path' ;
3
- import { fileURLToPath } from 'url' ;
1
+ import adapter from '@sveltejs/adapter-static' ;
4
2
5
3
if ( typeof self === 'undefined' ) {
6
4
globalThis . self = globalThis ;
7
5
}
8
6
9
- const dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
10
-
11
- const outDir = path . join ( dirname , 'build/eslint-plugin-svelte' ) ;
12
-
13
7
/** @type {import('@sveltejs/kit').Config } */
14
8
const config = {
15
9
compilerOptions : {
16
- preserveWhitespace : true
10
+ preserveWhitespace : true ,
11
+ warningFilter : ( warning ) => {
12
+ if ( warning . code === 'a11y_no_noninteractive_tabindex' ) return false ;
13
+ return true ;
14
+ }
17
15
} ,
18
16
extensions : [ '.svelte' , '.md' ] ,
19
17
kit : {
18
+ adapter : adapter ( {
19
+ fallback : '404.html'
20
+ } ) ,
20
21
paths : {
21
- base : '/eslint-plugin-svelte' ,
22
- relative : false
23
- } ,
24
- adapter : ghpagesAdapter ( {
25
- // default options are shown
26
- pages : outDir ,
27
- assets : outDir
28
- } )
22
+ base : '/eslint-plugin-svelte'
23
+ }
29
24
}
30
25
} ;
31
26
export default config ;
Original file line number Diff line number Diff line change 1
1
import { sveltekit } from '@sveltejs/kit/vite' ;
2
2
import path from 'path' ;
3
- // @ts -expect-error -- Missing types
4
3
import svelteMd from 'vite-plugin-svelte-md' ;
5
4
import { rules as pluginRules } from 'eslint-plugin-svelte' ;
6
5
import svelteMdOption from './tools/vite-plugin-svelte-md-option.mjs' ;
7
6
8
7
import generateRoutes from './tools/generate-routes.mjs' ;
9
- import type { UserConfig } from 'vite' ;
8
+ import { createLogger , type UserConfig } from 'vite' ;
10
9
import { fileURLToPath } from 'url' ;
11
10
12
11
generateRoutes ( ) ;
13
12
14
13
const dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
15
14
15
+ const logger = createLogger ( ) ;
16
+
16
17
/** @type {import('vite').UserConfig } */
17
18
const config : UserConfig = {
18
19
plugins : [
@@ -38,6 +39,16 @@ const config: UserConfig = {
38
39
commonjsOptions : {
39
40
ignoreDynamicRequires : true
40
41
}
42
+ } ,
43
+
44
+ customLogger : {
45
+ ...logger ,
46
+ warn ( msg , options ) {
47
+ if ( msg . includes ( 'vite-plugin-svelte-md' ) && msg . includes ( 'was used to transform files' ) ) {
48
+ return ;
49
+ }
50
+ logger . warn ( msg , options ) ;
51
+ }
41
52
}
42
53
} ;
43
54
You can’t perform that action at this time.
0 commit comments