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';
|
// import * as mdPlugin from 'vite-plugin-markdown';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(({ command, mode, ssrBuild }) => {
|
||||||
assetsInclude: ['**/*.md'],
|
if (command === "serve") {
|
||||||
// plugins: [mdPlugin(options)],
|
return {
|
||||||
build: {
|
assetsInclude: ["**/*.md"],
|
||||||
chunkSizeWarningLimit: 1600
|
server: {
|
||||||
},
|
port: 8000,
|
||||||
preview: {
|
strictPort: true,
|
||||||
open: true
|
https: true,
|
||||||
}
|
open: true,
|
||||||
|
cors: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
chunkSizeWarningLimit: 1600 * 2,
|
||||||
|
build: {
|
||||||
|
outDir: "dist",
|
||||||
|
emptyOutDir: true,
|
||||||
|
cssCodeSplit: true,
|
||||||
|
cssMinify: true,
|
||||||
|
minify: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user