Every now and then, some of my modules which do not and cannot rely on Anvil modules (ie web worker scripts) throw an error because it seems anvil has added import anvil.server automatically. Is there a way to prevent this behaviour?
I have not been able to pin down when or why this happens but suspect it is something to do with an update to the Anvil IDE causing the automatic imports to rerun?
@mapgar could you provide a little more information on what you’re seeing? I’m not aware of auto imports happening if you’ve turned off that setting in your look and feel dialog.
(Note you always get that import when creating a new server module. But that’s nothing new)
When auto-imports are on (default), it does look like adding a server module will add the import anvil.server everywhere. This is probably overkill, so we’ll look to do this only on the first time you create a server module.