Skip to content

Commit 4a8736f

Browse files
committedFeb 14, 2025
fix: fonts assets, close #139, close #140, close #137
1 parent 867e041 commit 4a8736f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
 

‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ dist
8282

8383
.vite-inspect
8484

85-
public/assets/fonts
85+
src/client/public/assets/fonts

‎scripts/postbuild.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { readFileSync, writeFileSync } from 'node:fs'
2+
import fsp from 'node:fs/promises'
23
import { resolve } from 'node:path'
34

45
function patchCjs(cjsModulePath: string, name: string) {
@@ -13,3 +14,5 @@ function patchCjs(cjsModulePath: string, name: string) {
1314

1415
patchCjs(resolve('./dist/nuxt.cjs'), 'nuxt')
1516
patchCjs(resolve('./dist/index.cjs'), 'index.PluginInspect')
17+
18+
await fsp.cp('src/client/public/assets/fonts', 'dist/client/assets/fonts', { recursive: true })

‎uno.config.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ export default defineConfig({
4545
mono: 'DM Mono',
4646
sans: 'DM Sans',
4747
},
48-
processors: createLocalFontProcessor(),
48+
processors: createLocalFontProcessor({
49+
fontAssetsDir: 'src/client/public/assets/fonts',
50+
}),
4951
}),
5052
],
5153
transformers: [

0 commit comments

Comments
 (0)