My folder structure:
package.json
src
├── backend
│ ├── routes
│ │ ├── myRoute.js
├── index.js
├── .babelrc
The command i run from package.json: "build:server": "babel src/backend/ -d dist"
The resulting dist folder structure:
dist
├── src
│ ├── backend
│ ├── index.js
How can i get it to transpile all subfolders within backend as well? I tried babel src/backend/** -d dist and that didn't work either.
You should move your
.babelrcfile to the root of your directory