babel not transpiling outside of src directory.
See original GitHub issueNode version: 6.2.2 npm version: 3.9.5 Operating system: EI Capitan Command line used: npm run build
I’ve used slingshot on a few new projects and it works great. I’m trying to convert a few existing projects that were using browserify and gulp. I think I have everything in place however it is structured a little differently because of the way I was handling code common to multiple app:
common
… (some common components and utilities shared by all apps
app1
src/ …
app2
src/...
So, app1 for example, has some places where it imports code as:
import SomeComponent from '../../../common/compnents/SomeComponent';
And after doing an “npm run build” for app1, it seems that all components imported from the common folder outside of app1/src are not getting transpired by babel. When previously using gulp/browserify, even though I really just wanted to import the source files from common, I’ve found that each of the common components needed to have it’s own package.json (and npm install run) because of the way node resolves imports. I think this may be related… I tried copying the .babelrc to each of the common directories, but that didn’t help.
Any idea? Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
Thanks, that seems to have done it. I replace the include with exclude:/node_modules/. Each of the common components needed the .babelrc and all was processed.
Just committed this change. Thanks! 👍