I have a bit of a head-scratcher here. My homepage is suddenly returning:
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no">
</head>
<body>
<div id="app"> </div>
<script src="dev/main.js" type="text/javascript"></script>
</body>
</html>
Which looks nothing like anything any of my handlers return. I was working a different handler in a different namespace/file when this happened and I'm having some trouble figuring out where this is coming from. I don't, for example, have a div anywhere with the id app or any main.js file. Any clue where this might be coming from?maybe there's a file in resources, either in your app or in a dependency you've added? you can call ( and see if it returns anything.
That was it!
It was in a library that I was trying out, but decided against using and just hadn't gotten around to removing it from my deps.edn. I removed it and it's all working as expected now. Thanks!
Is there a way to circumvent that, though? In case another library I do want to use has a similar set up?
great!
honestly the main way is probably to ask the library author to move the file to a namespaced location, like resources/my/library/public/index.html. as a workaround you can fork the library and do it yourself. it's ok for applications to put stuff in E.g. resources/public/index.html but a library should never do that. it'd be like having a library source file at src/core.clj instead of src/com/example/core.clj
another solution/workaround is you could move your app's resources/public directory to a namespaced location instead, like resources/com/example/public. and then set :biff.middleware/root "com/example/public" in resources/config.edn