Skip to content

Commit

Permalink
refactor: apply config on AstroBuilder.setup
Browse files Browse the repository at this point in the history
  • Loading branch information
rayriffy committed Oct 17, 2023
1 parent 108acff commit b25ff18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ async function ssrBuild(
plugins: [...vitePlugins, ...(viteConfig.plugins || []), ...lastVitePlugins],
envPrefix: viteConfig.envPrefix ?? 'PUBLIC_',
base: settings.config.base,
// Tell Vite not to combine config from vite.config.js with our provided inline config
configFile: false,
};

const updatedViteBuildConfig = await runHookBuildSetup({
Expand Down
2 changes: 2 additions & 0 deletions packages/astro/src/core/create-vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export async function createVite(

// Start with the Vite configuration that Astro core needs
const commonConfig: vite.InlineConfig = {
// Tell Vite not to combine config from vite.config.js with our provided inline config
configFile: false,
cacheDir: fileURLToPath(new URL('./node_modules/.vite/', settings.config.root)), // using local caches allows Astro to be used in monorepos, etc.
clearScreen: false, // we want to control the output, not Vite
logLevel: 'warn', // log warnings and errors only
Expand Down

0 comments on commit b25ff18

Please sign in to comment.