If an asset bundle is published, its `basePath` will be set with the published path. So the original code is fine.