Skip to content

Commit 69da42d

Browse files
committed
Merge branch 'feat-ViteCopyIcons' into 'develop'
update for bootstrap icons See merge request 2pisoftware/cosine/core!414
2 parents 0a3a425 + 5168ba8 commit 69da42d

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

system/templates/base/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"ts-loader": "^9.5.1",
4747
"vite": "^5.4.2",
4848
"vite-plugin-commonjs": "^0.10.1",
49+
"vite-plugin-static-copy": "^2.2.0",
4950
"vue-loader": "^17.4.2",
5051
"webpack": "^5.93.0",
5152
"webpack-cli": "^5.1.4"

system/templates/base/src/scss/app.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@import 'variables';
66
@import 'bootstrap_overrides';
77

8-
$bootstrap-icons-font-dir: "/system/templates/base/node_modules/bootstrap-icons/font/fonts";
8+
$bootstrap-icons-font-dir: "/system/templates/base/dist/fonts";
99

1010
// Import bootstrap
1111
@import "bootstrap/scss/bootstrap";

system/templates/base/vite.config.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// vite.config.js
2+
import { viteStaticCopy } from 'vite-plugin-static-copy'
23
import path, { resolve } from 'path'
34
import { defineConfig, build } from 'vite'
45
import { glob } from 'glob';
@@ -66,7 +67,20 @@ _x.forEach((file) => {
6667
console.log("fileMap", _fileMapObj);
6768

6869
export default defineConfig({
69-
plugins: [vue()],
70+
plugins: [vue(),
71+
viteStaticCopy({
72+
targets: [
73+
{
74+
src: resolve(__dirname, scriptPath, 'system/templates/base/node_modules/bootstrap-icons/font/fonts/bootstrap-icons.woff'),
75+
dest: 'fonts'
76+
},
77+
{
78+
src: resolve(__dirname, scriptPath, 'system/templates/base/node_modules/bootstrap-icons/font/fonts/bootstrap-icons.woff2'),
79+
dest: 'fonts'
80+
}
81+
]
82+
})
83+
],
7084
build: {
7185
cssCodeSplit: true,
7286
minify: "terser",

0 commit comments

Comments
 (0)