forked from MTSR/mapserver
add bootstrap js script
This commit is contained in:
parent
4d5537ba28
commit
063ac37774
@ -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
16
static/js/bootstrap.js
vendored
Normal 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);
|
||||||
|
})();
|
Loading…
Reference in New Issue
Block a user