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: Allow excluding default plugins #262

Open
maxpatiiuk opened this issue Jun 20, 2024 · 0 comments
Open

feat: Allow excluding default plugins #262

maxpatiiuk opened this issue Jun 20, 2024 · 0 comments

Comments

@maxpatiiuk
Copy link

maxpatiiuk commented Jun 20, 2024

Custom Element Manifest Analyzer comes with over 20 plugins built-in.
Quite a few of them relate to extracting information about variables, arrow functions, function declarations and even mixins.

In our codebase, we have many components, so keeping build fast is nice. We don't want to expose any variables/functions/mixins in the documentation, so generating manifest for those is a waste.
We also don't need the default blocklist plugins as we have a custom plugin for deciding what gets included

Would it be possible for CEM to add a way to exclude default plugins (in the javascript API)?

Possible implementations:

  • Add a prop like transformConfig: (config:CemConfig)=>CemConfig that will act similar to Vite's configResolved(), letting us manipulate the final resolved config.
  • Add a prop like includePlugin: (pluginName:string)=>boolean for selecting what plugins should be included
  • Add a prop like includeDefaultPlugins: boolean for excluding all default plugins (at which point they will have to be explicitly provided to the plugins array)
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