taesik

manifest.json syntax error 본문

debug/web

manifest.json syntax error

taesikk 2021. 12. 28. 10:16
manifest.json 1 line 1 column syntax error

I found that manifest.json syntax error. 

 

Therefor I read Chrome browser developer part. As for manifest.json, It was not JSON form and It was html form. 

As my solution, 

 

<Rewrite syntax >

RewriteCond [TestString] [CondPattern]
RewriteRule [Pattern] [Substitution]

 

<sequence pattern>

 

1. If the pattern of RewriteRule is not violated, [TestString] of RewriteCond would be applied and start contition checking.

2. After RewriteCond condition check, use RewriteRule [Substitution] to satisfy the condition

 

In other words, if the pattern of the rule is satisfied, the condition (Cond) is found and the TestString condition check is performed.

 

*caution*
In the RewriteCond syntax, the 

. ( ) [ ]

Only these 5 characters are separated by a backslash.
ex) \. , \( , \) , \[ , \]

 

<RewriteRule regular expression summary>

[A] => Also means that only one character can come.
          ex) a[eo]t => aot or aet
   [^A] => The letter A cannot come.
   ? => 0 or 1 text.
   * => 0 or 1 or more text.
   + => 1 or more text. 0 cannot be

 

The ^ in [ ] means "not".

 

rewrite.config

RewriteCond %{REQUEST_URI} ^/(css|img|js|static).*$ [OR]
RewriteCond %{REQUEST_URI} ^/manifest.json$ [OR]
RewriteCond %{REQUEST_URI} ^/logo(192|512).png$ [OR]
RewriteCond ^.*$ - [L]

RewriteRule ^.*$ /index.html [L,QSA]

 This file uses Regex and wirte some files which I would ignore.