more verbose vite config

This commit is contained in:
2023-09-10 00:46:03 +02:00
parent f1780740ac
commit 075159e3da

View File

@ -1,13 +1,28 @@
import { defineConfig } from 'vite';
import { defineConfig } from "vite";
// import * as mdPlugin from 'vite-plugin-markdown';
export default defineConfig({
assetsInclude: ['**/*.md'],
// plugins: [mdPlugin(options)],
build: {
chunkSizeWarningLimit: 1600
},
preview: {
open: true
}
export default defineConfig(({ command, mode, ssrBuild }) => {
if (command === "serve") {
return {
assetsInclude: ["**/*.md"],
server: {
port: 8000,
strictPort: true,
https: true,
open: true,
cors: true,
},
};
} else {
return {
chunkSizeWarningLimit: 1600 * 2,
build: {
outDir: "dist",
emptyOutDir: true,
cssCodeSplit: true,
cssMinify: true,
minify: true,
},
};
}
});