Styledictionary/4/Module Common Js

/icons/calendar.svg

Last update

Aug 31, 2024

What Changed

This codemod updates Style Dictionary to use ES Modules format entirely in version 4, making it browser-compatible out of the box. This modern JavaScript standard, which supports NodeJS/Browser interoperability among other benefits, allows Style Dictionary to run in many more environments compared to before.

Before

const StyleDictionary = require('style-dictionary');

After

import StyleDictionary from 'style-dictionary';

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now