EXAMPLES AND INSTRUCTIONS TO CONFIGURE:
- ESBUILD: A FAST TYPESCRIPT TO JAVASCRIPT TRANSPILER AND BUNDLER.
- NODEMON: FOLLOW THE INSTRUCTIONS HERE.
npm install -D esbuild
npm install -D esbuild-node-tsc
npm install -D cpy
npm install -D rimraf
-
ADD folderBundle to .gitignore.
-
CREATE FILE esbuild.development.config.js.
-
CREATE FILE esbuild.production.config.js.
-
CREATE COMMAND
npm run esbuild-nodemon
BY ADDING THE FOLLOWING LINES TO THE script ENTRY IN package.json:"esbuild-nodemon": "nodemon --exec \"esbuild-node-tsc --config=esbuild.development.config.js && node %npm_config_jsfile%\"",
npm run esbuild-nodemon --jsfile=./folderDist/folderTopics/folderEsbuild/exampleEsbuild.js
# BUNDLE WITH ESBUILD AND RUN ON PRODUCTION MODE
node ./folderSource/folderTopics/folderEsbuild/esbuild.production.config.js # THIS IS GOING TO CREATE/BUNDLE ./folderBundle/exampleEsbuild.js
node ./folderBundle/exampleEsbuild.js