mars / heroku-cra-node

⚛️ How to use create-react-app with a custom Node server on Heroku
MIT License
927 stars 226 forks source link

Update engine to Node 14.x #49

Open maxfontani opened 3 years ago

maxfontani commented 3 years ago

1) The CommonJS variables "filename" and "dirname" are not available in ES modules, which caused deployment issues on Heroku. Added workaround as suggested in https://nodejs.org/api/esm.html#esm_no_filename_or_dirname

2) The engine update will run the latest Node version on deployment.

3) Adding the module type will allow the use of "import" statements.