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

[Feature Request]: Change Rust plugin priority from farm.config.ts #2127

Open
akku1139 opened this issue Mar 20, 2025 · 0 comments
Open

[Feature Request]: Change Rust plugin priority from farm.config.ts #2127

akku1139 opened this issue Mar 20, 2025 · 0 comments
Labels
enhancement: pending triage Untriaged enhancement

Comments

@akku1139
Copy link

What problem does this feature solve?

Users can easily change the priority of JavaScript plugins,
but there seems to be no way to set the priority of a Rust plugin from farm.config.ts.

import farmPostcssPlugin from "@farmfe/js-plugin-postcss";

export default defineConfig({
 plugins: [
   // Js plugin, configure the plugin object
   {
     ...farmPostcssPlugin({
       // ... configure postcss options
     }),
     // larger priority will be executed first, priority of internal plugin are 100.
     priority: 1000,
   }
 ],
});

https://www.farmfe.org/docs/using-plugins/#using-js-plugins

What does the proposed API look like?

this is an idea.

export default defineConfig({
  // ...
  plugins: [
    [
      // rust plugin's name
      "@farmfe/super-plugin",
      // rust plugin's options
      {
        additionalData: '@use "@/global-variables.scss";'
      },
      // farm options
      {
        priority: 1000,
      },
    ],
  ],
});
@akku1139 akku1139 added the enhancement: pending triage Untriaged enhancement label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement: pending triage Untriaged enhancement
Projects
None yet
Development

No branches or pull requests

1 participant