I don’t really understand the first question because you have elided some important details, but for the second question, there’s a “files” key you can set in package.json that specifies which files to include in the package tarball. If you set that to some pattern that excludes your tests, they will not be included. Alternatively, you can create a .npmignore file.
this post was submitted on 23 Jan 2024
1 points (100.0% liked)
JavaScript
1920 readers
2 users here now
founded 1 year ago
MODERATORS
In all seriousness, this is a fine scenario for AI guided learning. I gave Bing Copilot your question, and the response was very helpful.
Here's the trick though:
// In 'firereact/firestore/index.ts'
export { useDocument } from './useDocument';
and:
// In 'tsconfig.json'
{
"compilerOptions": {
// ...
},
"exclude": ["**/*.test.ts", "**/*.spec.ts", "path/to/firebase.ts"]
}