Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
chore: copy some user vite config into internal vite build config
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaAmaju committed Mar 13, 2024
1 parent f636e3c commit e2f1385
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/core/src/vite/Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,18 @@ export default function fullstack(userConfig?: Options) {
// const quietLogger = Vite.createLogger();
// quietLogger.info = () => undefined;

const build = resolvedViteConfig.build;

const result = await Vite.build({
configFile: false,
clearScreen: false,
logLevel: "silent",
css: resolvedViteConfig.css,
json: resolvedViteConfig.json,
base: resolvedViteConfig.base,
define: resolvedViteConfig.define,
esbuild: resolvedViteConfig.esbuild,
optimizeDeps: resolvedViteConfig.optimizeDeps,
envPrefix: resolvedViteConfig.envPrefix as string[],
// customLogger: quietLogger,
// We apply obfuscation to prevent vite:build-html plugin from freaking out
Expand All @@ -519,7 +526,16 @@ export default function fullstack(userConfig?: Options) {
outDir: buildDir,
emptyOutDir: false,
copyPublicDir: false,
minify: build.minify,
// assetsDir: build.assetsDir,
cssMinify: build.cssMinify,
cssTarget: build.cssTarget,
rollupOptions: { input: id_ },
cssCodeSplit: build.cssCodeSplit,
modulePreload: build.modulePreload,
assetsInlineLimit: build.assetsInlineLimit,
// chunkSizeWarningLimit: build.chunkSizeWarningLimit,
dynamicImportVarsOptions: build.dynamicImportVarsOptions,
},
});

Expand Down

0 comments on commit e2f1385

Please sign in to comment.