Yes, but how does your http server deliver the imported code to the front-end? Are you using some type of streaming bundler that does real time builds? Something isn't making sense here.
On application startup I assemble together the various front end files I need and store this in memory as a string. When the server sees a request for the desired page I respond with the desired string.
Since I am not handcuffed by some giant framework I have maximum flexibility to do what makes sense.
Since I am not handcuffed by some giant framework I have maximum flexibility to do what makes sense.