File tree 1 file changed +29
-2
lines changed
1 file changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ img.src = imageUrl;
16
16
```
17
17
18
18
``` html [HTML]
19
- <img src =" ~/assets/image.png" />
19
+ <!-- In HTML tags, you must use the relative path --->
20
+ <img src =" ../assets/image.png" />
20
21
```
21
22
22
23
``` css [CSS]
@@ -25,6 +26,22 @@ img.src = imageUrl;
25
26
}
26
27
```
27
28
29
+ ``` vue [Vue]
30
+ <script>
31
+ import image from '~/assets/image.png';
32
+ </script>
33
+
34
+ <template>
35
+ <img :src="image" />
36
+ </template>
37
+ ```
38
+
39
+ ``` jsx [JSX]
40
+ import image from ' ~/assets/image.png' ;
41
+
42
+ < img src= {image} / > ;
43
+ ```
44
+
28
45
:::
29
46
30
47
## ` /public ` Directory
@@ -52,6 +69,16 @@ img.src = imageUrl;
52
69
}
53
70
```
54
71
72
+ ``` vue [Vue]
73
+ <template>
74
+ <img src="/image.png" />
75
+ </template>
76
+ ```
77
+
78
+ ``` jsx [JSX]
79
+ < img src= " /image.png" / >
80
+ ```
81
+
55
82
:::
56
83
57
84
## Inside Content Scripts
@@ -114,7 +141,7 @@ export default defineConfig({
114
141
manifest: {
115
142
web_accessible_resources: [
116
143
{
117
- // We'll use this matches in the cotent script as well
144
+ // We'll use this matches in the content script as well
118
145
matches: [' *://*.github.com/*' ],
119
146
// Use the same path as `relativeDest` from the WXT module
120
147
resources: [' /oxc_parser_wasm_bg.wasm' ],
You can’t perform that action at this time.
0 commit comments