質問編集履歴

2

タグの追記

2022/04/14 05:41

投稿

nmty
nmty

スコア19

test CHANGED
File without changes
test CHANGED
File without changes

1

誤字の修正

2022/04/14 04:51

投稿

nmty
nmty

スコア19

test CHANGED
File without changes
test CHANGED
@@ -22,7 +22,7 @@
22
22
  ├── sample3.css
23
23
  └── sample3.js
24
24
  ```
25
- 各HTML(a1.html、a2.html、a3.html)からstaticフォルダのcss、javascriptファイルを読みこんでいますが、パスが間違っているとします。(パスが”/hoge/xxx/”ではなく、”../../”が正しいパス)
25
+ 各HTML(a1.html、a2.html、a3.html)からstaticフォルダのcss、javascriptファイルを読みこんでいますが、パスが間違っているとします。(パスが”/hoge/xxx/”ではなく、”../../static/”が正しいパス)
26
26
 
27
27
 
28
28
  ```a1.html
@@ -33,7 +33,7 @@
33
33
  <meta charset="utf-8" />
34
34
  <title>App</title>
35
35
 
36
-  // ”/hoge/xxx/”ではなく、”../../”が正しいパス
36
+  // ”/hoge/xxx/”ではなく、”../../static/”が正しいパス
37
37
  <link rel="preload" href="/hoge/xxx/sample.css" as="style" />
38
38
  <link rel="preload" href="/hoge/xxx/sample2.css" as="style" />
39
39
  <link rel="preload" href="/hoge/xxx/sample3.css" as="style" />
@@ -67,7 +67,7 @@
67
67
  <meta charset="utf-8" />
68
68
  <title>App2</title>
69
69
 
70
- // ”/hoge/xxx/”ではなく、”../../”が正しいパス
70
+ // ”/hoge/xxx/”ではなく、”../../static/”が正しいパス
71
71
  <link rel="preload" href="/hoge/xxx/sample.css" as="style" />
72
72
  <link rel="preload" href="/hoge/xxx/sample2.css" as="style" />
73
73
  <script src="/hoge/xxx/static/sample.js"></script>
@@ -100,7 +100,7 @@
100
100
  <meta charset="utf-8" />
101
101
  <title>App3</title>
102
102
 
103
- // ”/hoge/xxx/”ではなく、”../../”が正しいパス
103
+ // ”/hoge/xxx/”ではなく、”../../static/”が正しいパス
104
104
  <link rel="preload" href="/hoge/xxx/sample3.css" as="style" />
105
105
  <script src="/hoge/xxx/static/sample3.js"></script>
106
106
 
@@ -124,7 +124,7 @@
124
124
  </html>
125
125
  ```
126
126
  この場合、src/server配下の全てのhtmlファイルで読み込まれている、
127
- ”/hoge/xxx/”、という文字列を、”../../”という文字列に置換したいのですが、
127
+ ”/hoge/xxx/”、という文字列を、”../../static/”という文字列に置換したいのですが、
128
128
  方法が思いつかないため質問させて頂きました。
129
129
  方法がわかる方がいらっしゃいましたら教えて頂けると助かります。
130
130