mu-semtech / mu-javascript-template

Template for running javascript/express microservices
4 stars 17 forks source link

production build will run babel on node_modules if that folder is present #28

Closed nvdk closed 3 years ago

nvdk commented 3 years ago

it looks like the production build script currently has the implicit assumption that no node_modules dir is present in the app. folder

when building with babel the --ignore flag only ignores the node_modules dir in the root directory and not in the app/node_modules sub directory.

The script should either remove the node_modules dir in the subdirectory (this makes the most sense I think) or the ignore flag should be changed to --ignore **/node_modules.

Running babel on node_modules is not required and not recommended

nvdk commented 3 years ago

reopened, it looks like you run into this as soon as you have a non es6 dependency in your app. use case where I ran into it: using handlebars in a backend service, but confirmed it also break with another package (forgot which one unfortunately, I think mocha)