Change the following
import { version } from '../../package.json';
to something like
import packageInfo from '../../package.json';
And then change your access from something like
version,
or
version: version,
to
version: packageInfo.version,
As noted in the comments, there may be cases where you do not want to expose your entire package.json file in the client code.