File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
packages/unity-bootstrap-theme Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 11import react from "@vitejs/plugin-react" ;
2- import { resolve } from "path" ;
2+ import path , { resolve } from "path" ;
3+ import fs from "fs" ;
34import { defineConfig , transformWithEsbuild } from "vite" ;
45
56import pkg from "./package.json" ;
@@ -21,6 +22,16 @@ const c = {
2122 } ) ;
2223 } ,
2324 } ,
25+ {
26+ name : 'copy-bootstrap-umd-to-dist' ,
27+ // See https://vite.dev/guide/api-plugin#universal-hooks for closeBundle info
28+ closeBundle ( ) {
29+ const srcPath = path . resolve ( __dirname , "../../node_modules" , 'bootstrap/dist/js/bootstrap.bundle.min.js' ) ;
30+ const destDir = path . resolve ( __dirname , 'dist/js/bootstrap.bundle.min.js' ) ;
31+
32+ fs . copyFileSync ( srcPath , destDir ) ;
33+ }
34+ }
2435 ] ,
2536 optimizeDeps : {
2637 esbuildOptions : {
You can’t perform that action at this time.
0 commit comments