You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a `rollup.config.js`[configuration file](https://www.rollupjs.org/guide/en/#configuration-files), import the plugin, and add it to the `plugins` array:
28
28
29
29
```js
30
-
importafterEffectJsxfrom'./rollup-plugin-ae-jsx';
30
+
importafterEffectJsxfrom"./rollup-plugin-ae-jsx";
31
31
32
32
exportdefault {
33
-
input:'src/index.js',
33
+
input:"src/index.js",
34
34
output: {
35
-
file:'dist/index.jsx',
36
-
format:'cjs'
35
+
file:"dist/index.jsx",
36
+
format:"cjs",
37
37
},
38
-
plugins: [
39
-
afterEffectsJsx()
40
-
]
38
+
plugins: [afterEffectsJsx()],
41
39
};
42
40
```
43
41
@@ -48,9 +46,9 @@ Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#comma
48
46
49
47
## Limitations
50
48
51
-
Since After Effects compatible JSON isn't valid JavaScript, transformations must be done on the output code as a string rather than the AST. This means success is dependant on the formatting of the code.
52
-
53
-
While not perfect, it works well enough for our use, but errors may occur adapting it to work with your own code.
49
+
- Output code must be in a single file
50
+
- Makes some manual transformations outside of the AST
0 commit comments