[x] Update documentation and configuration samples
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.
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 yourpackage.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:adjust the command you run:
and start using
import foo from 'foo'
instead ofconst foo = require('foo')
to import the packages inside the.figmaexportrc.mjs
. You can take a look at .figmaexportrc.example.js as an example.