Using .htaccess in Firebase
<p>I'm developing a website using Firebase and I noticed that I am able to access the sub-folder JavaScript files when I right click on the page -> View Page Source -> *.js link click. I know from other hosting services I am able to write a .htaccess file to prevent this sort of behavior. However, I haven't found any documentation on it for Firebase. I tried their <a href="https://www.firebase.com/docs/hosting/guide/url-redirects-rewrites.html" rel="nofollow">URL Redirect and Rewrite</a> options. However, the redirect just made the whole javascript portion of the website not work by generating an error code in the console <code>"Uncaught SyntaxError: Unexpected token &lt;"</code> and the rewrite did nothing. Here's an example of the json file Firebase said to rewrite.</p>

<pre><code>{
  "firebase": "myfirebase",
  "public": "app",
  "ignore": [
    "firebase.json",
    "**/.*",
    "**/node_modules/**"
  ],
  "redirects": [ {
    "source" : "/js/*.js",
    "destination" : "https://www.firebase.com",
    "type" : 301
  }]
}
</code></pre>

<p>I want to be able to use all of the javascript files but prevent people on the internet from seeing these files. Is there any way to do that on Firebase? I want to make sure the website is secure.</p>