123456789101112131415161718192021222324252627 |
- import baseConfig from './base.config';
- import { defineConfig } from 'vite';
- import externalGlobals from 'rollup-plugin-external-globals'
- export default defineConfig({
- ...baseConfig,
- base: './',
- build: {
- outDir: 'docs',
- chunkSizeWarningLimit: 1500,
- rollupOptions: {
- external: ['highlight.js'],
- plugins: [
- externalGlobals({
- 'highlight.js': 'hljs',
- }),
- ],
- output: {
- manualChunks(id) {
- if (id.includes('node_modules')) {
- return id.toString().split('node_modules/')[1].split('/')[0].toString();
- }
- }
- }
- }
- },
- });
|