File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ let resolvedPostCssConfig: PostCSSConfigResult
28
28
29
29
const getViteConfig : GetViteConfigFn = ( command , options ) => {
30
30
const aliasDir = resolve ( options . cwd , dirname ( options . entry ) )
31
- const { alias = { } , extendViteConfig = { } } = resolvedKirbyupConfig
31
+ const { alias = { } , port = 5177 , extendViteConfig = { } } = resolvedKirbyupConfig
32
32
33
33
const baseConfig : InlineConfig = {
34
34
resolve : {
@@ -45,7 +45,8 @@ const getViteConfig: GetViteConfigFn = (command, options) => {
45
45
plugins : [ kirbyupHmrPlugin ( options ) , options . watch && fullReloadPlugin ( options . watch ) ] ,
46
46
// Input needs to be specified so dep pre-bundling works
47
47
build : { rollupOptions : { input : resolve ( options . cwd , options . entry ) } } ,
48
- } )
48
+ server : { port, strictPort : true , origin : `http://localhost:${ port } ` } ,
49
+ } as InlineConfig )
49
50
50
51
return mergeConfig ( serveConfig , extendViteConfig ) as InlineConfig
51
52
}
Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ export interface UserConfig {
30
30
*/
31
31
alias ?: AliasOptions
32
32
33
+ /**
34
+ * Specifies the port for the development server.
35
+ */
36
+ port ?: number
37
+
33
38
/**
34
39
* Extends Vite's configuration. Will be merged with kirbyup's
35
40
* default configuration. Be careful what to extend.
You can’t perform that action at this time.
0 commit comments