Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby): enable babel in deps #15284

Merged
merged 15 commits into from
Jul 2, 2019
Merged

Conversation

sidharthachatterjee
Copy link
Contributor

@sidharthachatterjee sidharthachatterjee commented Jul 1, 2019

This changes our setup to run babel on dependencies in node_modules that use gatsby, during both:

  • query compilation
  • code compilation

This follows up the work in #15270 and #15179

A follow up to this will include a better (and faster) heuristic when fetching the dependency tree as recommended by @KyleAMathews

@sidharthachatterjee sidharthachatterjee requested a review from a team as a code owner July 1, 2019 18:40
@sidharthachatterjee sidharthachatterjee force-pushed the feat/enable-babel-in-deps branch from 301ed72 to a34d55e Compare July 1, 2019 19:58
wardpeet
wardpeet previously approved these changes Jul 2, 2019
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sidharthachatterjee this is awesome, just the way I would do it! ❤️
Maybe write a test for the exclude/include mechanism 🤷‍♂ (I can do it in a follow up PR)

packages/gatsby/src/utils/webpack-utils.js Outdated Show resolved Hide resolved
packages/gatsby/src/utils/webpack-utils.js Show resolved Hide resolved
packages/gatsby/src/utils/webpack.config.js Outdated Show resolved Hide resolved
packages/gatsby/src/utils/webpack.config.js Outdated Show resolved Hide resolved
@sidharthachatterjee
Copy link
Contributor Author

Blocked by #15308

Co-Authored-By: Ward Peeters <ward@coding-tech.com>
@sidharthachatterjee sidharthachatterjee added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Jul 2, 2019
pieh
pieh previously approved these changes Jul 2, 2019
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮

pieh
pieh previously approved these changes Jul 2, 2019
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮 🌮

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮 🌮 🌮
(3 tacos's a charm)

@gatsbybot gatsbybot merged commit 4ea3fa1 into master Jul 2, 2019
@sidharthachatterjee sidharthachatterjee deleted the feat/enable-babel-in-deps branch July 2, 2019 19:53
@sidharthachatterjee
Copy link
Contributor Author

Published in gatsby@2.12.1

@ksjogo
Copy link

ksjogo commented Apr 13, 2020

Is there some way to exclude specific folders from this?
I have a monorepo with a basepackage depending on gatsby and providing some config and template components. This package's src/ is pretranspiled via tsc into a lib/ folder.
The concrete gatsby site requires this shared package and should only read lib/
But it is actually reading src/ as well due to it being a package depending on gatsby.
npmignore doesn't help/work here, as the dhared package is symlinked from the site and built in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants