more verbose vite config
This commit is contained in:
@ -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
|
||||
export default defineConfig(({ command, mode, ssrBuild }) => {
|
||||
if (command === "serve") {
|
||||
return {
|
||||
assetsInclude: ["**/*.md"],
|
||||
server: {
|
||||
port: 8000,
|
||||
strictPort: true,
|
||||
https: true,
|
||||
open: true,
|
||||
cors: true,
|
||||
},
|
||||
preview: {
|
||||
open: true
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
chunkSizeWarningLimit: 1600 * 2,
|
||||
build: {
|
||||
outDir: "dist",
|
||||
emptyOutDir: true,
|
||||
cssCodeSplit: true,
|
||||
cssMinify: true,
|
||||
minify: true,
|
||||
},
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user