Skip to content

Commit 1f90ad2

Browse files
因應 SASS 重大改版修正
1 parent 99288f0 commit 1f90ad2

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

src/assets/myStyle.scss

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1+
// Bootstrap
2+
@use 'bootstrap/dist/css/bootstrap';
3+
4+
// Font Awesome
5+
// $fa-font-path: '/node_modules/@fortawesome/fontawesome-free/webfonts';
6+
// @import '@fortawesome/fontawesome-free/scss/fontawesome.scss';
7+
// @import '@fortawesome/fontawesome-free/scss/solid.scss';
8+
// @import '@fortawesome/fontawesome-free/scss/regular.scss';
19
// Font Awesome
210
$fa-font-path: '/node_modules/@fortawesome/fontawesome-free/webfonts';
3-
@import '@fortawesome/fontawesome-free/scss/fontawesome.scss';
4-
@import '@fortawesome/fontawesome-free/scss/solid.scss';
5-
@import '@fortawesome/fontawesome-free/scss/regular.scss';
6-
7-
// Bootstrap
8-
@import 'bootstrap/dist/css/bootstrap';
11+
@use '@fortawesome/fontawesome-free/scss/fontawesome';
12+
// 需要在使用到的樣式設定變數配置
13+
@use '@fortawesome/fontawesome-free/scss/solid' with (
14+
$fa-font-path: $fa-font-path
15+
);
916

1017
.h1, .h2 {
1118
margin-bottom: 20px;

vite.config.js

+14-7
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ import vueDevTools from 'vite-plugin-vue-devtools';
66

77
// https://vitejs.dev/config/
88
export default defineConfig({
9-
base: '/hex-vue3-practise/',
10-
plugins: [vue(), vueDevTools()],
11-
resolve: {
12-
alias: {
13-
'@': fileURLToPath(new URL('./src', import.meta.url)),
14-
},
15-
},
9+
base: '/hex-vue3-practise/',
10+
plugins: [vue(), vueDevTools()],
11+
resolve: {
12+
alias: {
13+
'@': fileURLToPath(new URL('./src', import.meta.url)),
14+
},
15+
},
16+
css: {
17+
preprocessorOptions: {
18+
scss: {
19+
api: 'modern',
20+
},
21+
},
22+
},
1623
});

0 commit comments

Comments
 (0)