New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing as a dev dependency will crash the app after installing as production-only #150
Comments
ts-reset not for dev dependency. It's directly changes types (yes in dev) but have a js files too. that means import going for js files too. in that case u importing |
Why? Just use it correctly not as import in file but in "compilerOptions": {
"types": [
"@types/node",
"@total-typescript/ts-reset",
],
} |
This seems like the way. |
I dunno 🤷♂️. Probably @mattpocock knows. |
This will not always work: "compilerOptions": {
"types": [
"@types/node",
"@total-typescript/ts-reset",
],
} Here's a concrete example, and a pretty typical use case: "typeRoots": [
"./node_modules/@types"
],
"types": [
"node"
], Adding |
It's not a bug per se, but it should be mentioned in the Readme that any application running with this library installed as a dev dependency and built with either
npm install -only=production
ornpm ci -only=production
will not bundle this package, and when referenced in code will cause the application to crash.You can test with the following Dockerfile:
Assuming that the
src
directory has a singleindex.ts
that when built will output JS to thedist
directory.The text was updated successfully, but these errors were encountered: