Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Node.js TypeScript and Native Module Support
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[TSCONFIG_PATH] - ✦
[NATIVE_DEPS] - ✦
[DIST_FOLDER] - ✦
[NODE_ENV]
nodejs-typescript-native-module-docker.txt
Expert Prompt: Create a Dockerfile for a Node.js TypeScript application that requires [NATIVE_DEPS] (e.g., node-gyp, python3, make). Use a multi-stage approach where the build stage includes all build-essential tools, compiles the TS source using [TSCONFIG_PATH], and then the runner stage selectively copies the [DIST_FOLDER] and the production node_modules. Optimize for [NODE_ENV] and demonstrate how to handle native module binaries to prevent 'module not found' errors in the final slim image.
Example Output
"The AI provides a Dockerfile that successfully bridges the gap between heavy build-time dependencies and a lightweight runtime for TypeScript apps."