Yeap - when it comes to dependencies - i’ve often ended up moving js/css into the native libraries to account for this issue.
More recently, i’ve taken to adding some js/css features in python within the dependency and adding them dynamically. This way it can all be contained within a single python module.
from anvil.js.window import document
sheet = document.createElement('style')
sheet.innerHTML = """
div {
border: 2px solid black;
background-color: blue;
}
"""
document.body.appendChild(sheet)