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: custom include paths and esbuild jest config #5

Merged
merged 10 commits into from
Jan 18, 2021
Merged

Conversation

mariobm
Copy link
Contributor

@mariobm mariobm commented Jan 12, 2021

Added new feature:

  • option: includePaths for including external directories in loader (i needed this feature so i decided to add it)
  • esbuild for jest config
// craco.config.js
const CracoEsbuildPlugin = require("craco-esbuild");

module.exports = {
  plugins: [
    {
      plugin: CracoEsbuildPlugin,
      options: {
        esbuildLoaderOptions: {
          includePaths: ["/some/external/dir"], // includePaths is optional
          loader: "jsx",
          target: "es2015",
        },
      },
    },
  ],
};

Closes #2

@mariobm mariobm changed the title Custom include paths and esbuild with jest Custom include paths Jan 12, 2021
@mariobm mariobm changed the title Custom include paths Custom include paths and esbuild jest config Jan 12, 2021
@mariobm
Copy link
Contributor Author

mariobm commented Jan 12, 2021

Hi just added support for external dir and managed to get working overrideJestConfig.
The code is commented.

Copy link
Owner

@pradel pradel left a comment

Choose a reason for hiding this comment

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

Wow super cool that you got the jest config working, thanks for this 🚀
I left some small comments and I can release a new version once resolved!

@pradel pradel changed the title Custom include paths and esbuild jest config feat: custom include paths and esbuild jest config Jan 12, 2021
@pradel
Copy link
Owner

pradel commented Jan 13, 2021

@mariobm the tests are failing looks like there is something wrong in the logic

@pradel pradel merged commit 3438f09 into pradel:main Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use esbuild with jest for the tests
2 participants