File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ import InlineWorker from './shader.js?worker&inline'
85
85
86
86
## new URL(url, import.meta.url)
87
87
88
- [ import.meta.url] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import%2Emeta ) 是一个 ESM 的原生功能,会暴露当前模块的 URL。将它与原生的 [ URL 构造器] ( https://developer.mozilla.org/en-US/docs/Web/API/URL ) 组合使用,在一个 JavaScript 模块中,通过相对路径我们就能得到一个被完整解析的静态资源 URL:
88
+ [ import.meta.url] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta ) 是一个 ESM 的原生功能,会暴露当前模块的 URL。将它与原生的 [ URL 构造器] ( https://developer.mozilla.org/en-US/docs/Web/API/URL ) 组合使用,在一个 JavaScript 模块中,通过相对路径我们就能得到一个被完整解析的静态资源 URL:
89
89
90
90
``` js
91
91
const imgUrl = new URL (' ./img.png' , import .meta.url)
Original file line number Diff line number Diff line change 10
10
"chalk" : " ^4.1.0" ,
11
11
"gray-matter" : " ^4.0.3" ,
12
12
"lodash" : " ^4.17.21" ,
13
- "vitepress" : " ^0.19.1 " ,
13
+ "vitepress" : " ^0.19.2 " ,
14
14
"yorkie" : " ^2.0.0"
15
15
},
16
16
"scripts" : {
Original file line number Diff line number Diff line change @@ -639,10 +639,10 @@ vite@^2.5.0:
639
639
optionalDependencies :
640
640
fsevents "~2.3.2"
641
641
642
- vitepress@^0.19.1 :
643
- version "0.19.1 "
644
- resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-0.19.1 .tgz#972fb8eb5687d26e4f7048796366dfb565aef8e4 "
645
- integrity sha512-+tC2xy4r6zcYlUypyJPIsQd3lhNtomNUMo9r5JD+A721sb686lxmlsYrYYKf2vZ9DWUQ3T091u3tET7vJnZwjw ==
642
+ vitepress@^0.19.2 :
643
+ version "0.19.2 "
644
+ resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-0.19.2 .tgz#125d9c218201486f3c51b6b8dcbca37c7f27a76c "
645
+ integrity sha512-F8KY5gTfIa9B61by6rlGQE2K/fw2FIflld6UuB3SHTp0E5cblYGUkGfVwMiai+ets2ztDqWIiJJqpDBm/Cam1Q ==
646
646
dependencies :
647
647
" @docsearch/css" " ^1.0.0-alpha.28"
648
648
" @docsearch/js" " ^1.0.0-alpha.28"
You can’t perform that action at this time.
0 commit comments