Issue resolved thanks to @jonrsharpe!
I had to add a separate .npmignore file as the .gitignore ended up ignoring the bundled contents in my ./dist, too, when publishing to NPM. Saying explicitly what to and what not to ignore worked. I should looked more explicitly the published npm package instead of just keeping an eye on my local.
Here's the .npmignore I'm using:
# Ignore node_modules (already ignored by default by npm)
node_modules/
# Ignore TypeScript source files if you compile to JavaScript
src/
# Ignore test files
test/
__tests__/
*.spec.ts
*.test.ts
# Ignore build scripts, configs, and environment files
scripts/
build/
.env
*.log
*.sh
# Ignore configuration files (these are generally not needed in the final package)
tsconfig.json
.eslintrc.json
.prettierrc
jest.config.js
.vscode/
# Ignore local environment files or OS-generated files
.DS_Store
Thumbs.db
# Ignore npm and yarn lockfiles (optional, depending on your preference)
package-lock.json
yarn.lock
# Ignore git-related files
.git/
.gitignore