Skip to content

Commit 5ec3ad4

Browse files
authored
Respect user config for all config options (#176)
1 parent 243753a commit 5ec3ad4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ function resolveLaravelPlugin(pluginConfig: Required<PluginConfig>): LaravelPlug
121121
ensureCommandShouldRunInEnvironment(command, env)
122122

123123
return {
124-
base: command === 'build' ? resolveBase(pluginConfig, assetUrl) : '',
125-
publicDir: false,
124+
base: userConfig.base ?? command === 'build' ? resolveBase(pluginConfig, assetUrl) : '',
125+
publicDir: userConfig.publicDir ?? false,
126126
build: {
127127
manifest: userConfig.build?.manifest ?? !ssr,
128128
outDir: userConfig.build?.outDir ?? resolveOutDir(pluginConfig, ssr),
@@ -132,7 +132,7 @@ function resolveLaravelPlugin(pluginConfig: Required<PluginConfig>): LaravelPlug
132132
assetsInlineLimit: userConfig.build?.assetsInlineLimit ?? 0,
133133
},
134134
server: {
135-
origin: '__laravel_vite_placeholder__',
135+
origin: userConfig.server?.origin ?? '__laravel_vite_placeholder__',
136136
...(process.env.LARAVEL_SAIL ? {
137137
host: userConfig.server?.host ?? '0.0.0.0',
138138
port: userConfig.server?.port ?? (env.VITE_PORT ? parseInt(env.VITE_PORT) : 5173),

0 commit comments

Comments
 (0)