Registry
M

styledictionary/4/hook-api-preprocessors

No description available

manishjha-0410,231 executions

  • Legacy
  • styledictionary
  • 4
  • migration
Connect a repo
npx codemod styledictionary/4/hook-api-preprocessors

What Changed

This codemod updates registered preprocessors to be placed inside the hooks.preprocessors property, instead of preprocessor, with a shift from the singular to the plural form. Registered preprocessors now apply globally without requiring explicit application in the config.

Before

jsx
export default {
  preprocessors: {
    foo: (dictionary) => {
      // preprocess it
      return dictionary;
    },
  },
  preprocessors: ["foo"],
  platforms: {
    css: {
      preprocessors: ["foo"],
    },
  },
};

After

jsx
export default {
  preprocessors: ["foo"],

  platforms: {
    css: {
      preprocessors: ["foo"],
    },
  },

  hooks: {
    preprocessors: {
      foo: (dictionary) => {
        // preprocess it
        return dictionary;
      },
    },
  },
};

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.