Publish an extension with a server-side component to NPMJS

How can I do this (included below) using pyproject.toml and not the setup.py file, to successfully publish an extension with a server-side python component?
“The general idea is to pack the Jupyterlab extension using npm pack , and then use the data_files logic in setup.py to ensure the file ends up in the <jupyterlab_application>/share/jupyter/lab/extensions directory.”

My code works for publishing to pypi, but for npmjs, the client side works but the mapping to the server side is broken.

thanks.