在我的index.html中,我通过执行以下操作来内联一些外部css:
<link rel="stylesheet" href="assets/css/external-material.css" />
在制作模式中,我想加入external-material.min.css
有没有办法在我的index.html中检测到我处于生产模式?
答案 0 :(得分:2)
你可以,即使我不推荐它。
在用于制作的环境文件中,添加此
window.onload = () => window['isProductionModeEnabled'] = true;
在index.html
文件中,您现在可以使用绑定到窗口的值执行您想要的操作。