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

Add an option to allow packages to be transpiled #38

Open
titouanmathis opened this issue Jun 1, 2021 · 1 comment
Open

Add an option to allow packages to be transpiled #38

titouanmathis opened this issue Jun 1, 2021 · 1 comment

Comments

@titouanmathis
Copy link
Collaborator

With the current configuration in v2.9.0, if we need to add packages installed with NPM to the Babel transpilation, we need to override the Webpack config as follows:

module.exports = {
  webpack(config) {
    const [babel] = config.module.rules;
    babel.exclude = [
      /node_modules/,
      { not: [/@namespace\/package/, /other-package/] },
    ];
  },
};

It could be useful to have an option to easily manage this kind of modification, i.e.:

module.exports = {
  transpileInclude: ['@namespace/package', /other-package-(one|twog)/],
};
@titouanmathis
Copy link
Collaborator Author

Partially fixed in v3.1.0-alpha.1 for packages in the @studiometa/* namespace.

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

No branches or pull requests

1 participant