Several quality improvements including top and bottom bus bar, seperate downloads for bus bars and a sharable configuration link
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
28
vite.config.js
Normal file
28
vite.config.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { cpSync, existsSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
function copyVendorAssets() {
|
||||
return {
|
||||
name: 'copy-vendor-assets',
|
||||
closeBundle() {
|
||||
const root = process.cwd();
|
||||
const sourceDir = resolve(root, 'vendor');
|
||||
const targetDir = resolve(root, 'dist/vendor');
|
||||
if (existsSync(sourceDir)) {
|
||||
cpSync(sourceDir, targetDir, { recursive: true });
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
base: './',
|
||||
plugins: [copyVendorAssets()],
|
||||
server: {
|
||||
host: true,
|
||||
},
|
||||
preview: {
|
||||
host: true,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user