marcomontalbano / figma-export

Export tool for Figma. You can easily and automatically export your Figma components and use them directly into your website.
https://figma-export.marcomontalbano.com
MIT License
259 stars 33 forks source link

Drop Node.js 16 support and move to ESM #164

Closed marcomontalbano closed 6 months ago

marcomontalbano commented 8 months ago

Discussion #167

What's inside?

Breaking changes

This library is now pure ESM.

This change may seem significant, but for most users, it's likely to have minimal impact. If your project already uses type="module" in your package.json, you're good to go.

However, if your project hasn't yet made this transition, you'll need to rename your .figmaexportrc.js configuration file:

-  .figmaexportrc.js
+  .figmaexportrc.mjs

adjust the command you run:

figma-export use-config .figmaexportrc.mjs

and start using import foo from 'foo' instead of const foo = require('foo') to import the packages inside the .figmaexportrc.mjs. You can take a look at .figmaexportrc.example.js as an example.