File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ export default defineConfig({
43
43
port : 3000 ,
44
44
warmup : { clientFiles : [ "./src/app.tsx" ] } ,
45
45
} ,
46
+ build : { sourcemap : true } ,
46
47
resolve : {
47
48
alias : Object . fromEntries (
48
49
Object . entries ( tsconfig . compilerOptions . paths ) . map ( ( [ key , value ] ) => [
Original file line number Diff line number Diff line change 6
6
"dev" : " vinxi dev" ,
7
7
"build" : " vinxi build" ,
8
8
"start" : " vinxi start" ,
9
+ "serve" : " cd .output && npx http-server public -p 3000" ,
9
10
"version" : " vinxi version"
10
11
},
11
12
"dependencies" : {
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ export const routes: RouteDefinition[] = [
11
11
path : "/articles/:name" ,
12
12
component : ( p ) => {
13
13
// router bug: 'name' not in 'p', update when this is fixed
14
- const name = p . location . pathname . replace ( `${ config . base } /articles/` , "" ) ;
14
+ let name = p . location . pathname . replace ( `${ config . base } /articles/` , "" ) ;
15
+ if ( name . endsWith ( "/" ) ) name = name . slice ( 0 , - 1 ) ;
15
16
return (
16
17
< div class = "mb-16" >
17
18
< Article name = { name } />
You can’t perform that action at this time.
0 commit comments