Skip to content

Commit

Permalink
Respect user config for all config options (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher authored Dec 5, 2022
1 parent 243753a commit 5ec3ad4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ function resolveLaravelPlugin(pluginConfig: Required<PluginConfig>): LaravelPlug
ensureCommandShouldRunInEnvironment(command, env)

return {
base: command === 'build' ? resolveBase(pluginConfig, assetUrl) : '',
publicDir: false,
base: userConfig.base ?? command === 'build' ? resolveBase(pluginConfig, assetUrl) : '',
publicDir: userConfig.publicDir ?? false,
build: {
manifest: userConfig.build?.manifest ?? !ssr,
outDir: userConfig.build?.outDir ?? resolveOutDir(pluginConfig, ssr),
Expand All @@ -132,7 +132,7 @@ function resolveLaravelPlugin(pluginConfig: Required<PluginConfig>): LaravelPlug
assetsInlineLimit: userConfig.build?.assetsInlineLimit ?? 0,
},
server: {
origin: '__laravel_vite_placeholder__',
origin: userConfig.server?.origin ?? '__laravel_vite_placeholder__',
...(process.env.LARAVEL_SAIL ? {
host: userConfig.server?.host ?? '0.0.0.0',
port: userConfig.server?.port ?? (env.VITE_PORT ? parseInt(env.VITE_PORT) : 5173),
Expand Down

0 comments on commit 5ec3ad4

Please sign in to comment.