1
0
forked from MTSR/mapserver

add bootstrap js script

This commit is contained in:
BuckarooBanzay 2020-04-14 14:11:33 +02:00
parent 4d5537ba28
commit 063ac37774
2 changed files with 18 additions and 5 deletions

View File

@ -26,10 +26,7 @@
<script src="js/lib/leaflet.awesome-markers.js"></script> <script src="js/lib/leaflet.awesome-markers.js"></script>
<script src="js/lib/moment.min.js"></script> <script src="js/lib/moment.min.js"></script>
<!-- main module --> <!-- bootstrap script -->
<script src="js/main.js?v=1.0" type="module"></script> <script src="js/bootstrap.js"></script>
<!-- no modules -->
<script src="js/bundle.js?v=1.0" nomodule></script>
</body> </body>
</html> </html>

16
static/js/bootstrap.js vendored Normal file
View File

@ -0,0 +1,16 @@
(function(){
var s = document.createElement("script");
if (location.host === "127.0.0.1:8080") {
//dev
s.setAttribute("src", "js/main.js");
s.setAttribute("type", "module");
} else {
//prod
s.setAttribute("src", "js/bundle.js");
}
document.body.appendChild(s);
})();