The package.swift files are made to be standalone files without dependencies, So this is not possible unfortunately.
But if your shared code is mostly data, You can put it in a structured Json file and read it in the package file