Skip to content

Commit cf033d1

Browse files
Merge pull request #1498 from ASU/uds-1978
Uds 1978 - unity-react-core required an updated version of the theme package
2 parents f946583 + 75be0fc commit cf033d1

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

packages/unity-bootstrap-theme/vite.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import react from "@vitejs/plugin-react";
2-
import { resolve } from "path";
2+
import path, { resolve } from "path";
3+
import fs from "fs";
34
import { defineConfig, transformWithEsbuild } from "vite";
45

56
import 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: {

packages/unity-react-core/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"test:browser": "vitest --workspace=vitest.workspace.ts"
4949
},
5050
"devDependencies": {
51-
"@asu/unity-bootstrap-theme": "^1.20.2",
51+
"@asu/unity-bootstrap-theme": "^1.21.3",
5252
"@babel/cli": "^7.19.3",
5353
"@babel/core": "^7.21.3",
5454
"@babel/plugin-transform-runtime": "^7.19.6",
@@ -129,6 +129,7 @@
129129
"styled-components": "^5.3.0"
130130
},
131131
"peerDependencies": {
132+
"@asu/unity-bootstrap-theme": "^1.21.3",
132133
"@fortawesome/fontawesome-free": "^5.15.3",
133134
"react": "^18.3.1",
134135
"react-dom": "^18.3.1",

yarn.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ __metadata:
611611
languageName: unknown
612612
linkType: soft
613613

614-
"@asu/unity-bootstrap-theme@npm:^1.0.0, @asu/unity-bootstrap-theme@npm:^1.20, @asu/unity-bootstrap-theme@npm:^1.20.2, @asu/unity-bootstrap-theme@workspace:packages/unity-bootstrap-theme":
614+
"@asu/unity-bootstrap-theme@npm:^1.0.0, @asu/unity-bootstrap-theme@npm:^1.20, @asu/unity-bootstrap-theme@npm:^1.20.2, @asu/unity-bootstrap-theme@npm:^1.21.3, @asu/unity-bootstrap-theme@workspace:packages/unity-bootstrap-theme":
615615
version: 0.0.0-use.local
616616
resolution: "@asu/unity-bootstrap-theme@workspace:packages/unity-bootstrap-theme"
617617
dependencies:
@@ -674,7 +674,7 @@ __metadata:
674674
version: 0.0.0-use.local
675675
resolution: "@asu/unity-react-core@workspace:packages/unity-react-core"
676676
dependencies:
677-
"@asu/unity-bootstrap-theme": "npm:^1.20.2"
677+
"@asu/unity-bootstrap-theme": "npm:^1.21.3"
678678
"@babel/cli": "npm:^7.19.3"
679679
"@babel/core": "npm:^7.21.3"
680680
"@babel/plugin-transform-runtime": "npm:^7.19.6"
@@ -752,6 +752,7 @@ __metadata:
752752
vitest: "npm:^2.1.1"
753753
vitest-browser-react: "npm:^0.0.1"
754754
peerDependencies:
755+
"@asu/unity-bootstrap-theme": ^1.21.3
755756
"@fortawesome/fontawesome-free": ^5.15.3
756757
react: ^18.3.1
757758
react-dom: ^18.3.1

0 commit comments

Comments
 (0)