Open diegolaciar opened 5 years ago
Good question, so this would be a good example for this repo so I'll add it as a feature request.
I'm also using Typescript but I'm having a problem with my IDE (VSCode). For types to work, it needs to load @types files but when VSCode try to find the types inside node_modules
folder, it can't find it because that folder is inside the container. Is there any work around to make this work?
@focux Compare with Microsoft recipe, which installs in host:
https://github.com/Microsoft/vscode-recipes/tree/master/Docker-TypeScript
@focux in cases where you need host tools to see node_modules, then you could:
docker-compose run node npm i
before doing a docker-compose up
. This way you simplify the node_modules config on both host and container and VSCode will work, but you loose the advantage of having node_modules in container on a different path, which means you have to be careful not to ever do a npm install
from host.
Hi Bret,
I'm using typescript with node.
the command 'npm run build' generate the compiled sources on 'dist' folder.
I want to ask you how would you update the Dockerfile to use a prepiler as typescript or babel with node? What is best practice on this case?
Thanks, Diego