9
Help me understand module system in ES
(programming.dev)
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"]
}
Yep, tried ChatGPT on that but screwed up the project and had to revert back to an older tag for it, but I will try this surely.
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.
Thank you, I've used files
to exclude them from the bundle. :)