@usemotif/compiler-babel
v1.8.0
Published
Babel plugin for motif-js static style extraction.
Readme
@usemotif/compiler-babel
The Babel-plugin form of motif-js's static style-prop extractor.
Used by @usemotif/compiler-metro inside the React Native build pipeline, and consumable directly by Babel-driven web bundlers. Most web users want @usemotif/compiler-web instead - it wraps this plugin for the unplugin ecosystem (Vite, Rollup, Webpack, etc.).
Install
yarn add -D @usemotif/compiler-babelOptions worth knowing
onBail(event)- called for each motif element left to the runtime, withfilename,line,column,element,reason(dynamic-props,has-spread, or the reason the wrapper had to stay, such asref-attribute), and the dynamicprops. Setting it never changes the output. The bundler plugin and the Metro transformer accept it too.
