79074141

Date: 2024-10-10 11:23:22
Score: 1
Natty:
Report link

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
Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @jonrsharpe
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Rahul