Optimized the root .gitignore to exclude virtual environments, node modules, and temp folders to ensure clean and lightweight version tracking. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
507 B
TypeScript
20 lines
507 B
TypeScript
import type { Plugin } from 'vite';
|
|
|
|
export function forceInlineDynamicImportsOff(enable: boolean): Plugin {
|
|
return {
|
|
name: 'force-inline-dynamic-imports-off',
|
|
configResolved(config) {
|
|
if (!enable) {
|
|
return;
|
|
}
|
|
const output = config.build.rollupOptions.output;
|
|
const outputs = Array.isArray(output) ? output : output ? [output] : [];
|
|
outputs.forEach((item) => {
|
|
if (item) {
|
|
item.inlineDynamicImports = false;
|
|
}
|
|
});
|
|
}
|
|
};
|
|
}
|