build/main.js in PWA 有全部源码!!如何保护我的 PWA?

build/main.js in PWA has all the source code!! How to protect my PWA?

Ionic 3 PWA:当我访问我的pwa网站(https://*****.com/pwa/build/main.js)时,我可以看到所有的源代码!我怎样才能保护这个文件并使我的 PWA 安全? 请帮忙。

我解决了。 我在 "build" 目录中创建“.htaccess”文件:

重写引擎开启 RewriteCond %{HTTP_REFERER} !^https://(.+.)?mywebsite.com/ [NC] 重写规则 .*.(js|css|map)$ - [F]