move entryPoint canonicalisation into bundling function