Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexandernanberg/babel-plugin-fbt-import
Plugin to automatically import FBT
https://github.com/alexandernanberg/babel-plugin-fbt-import
Last synced: 2 days ago
JSON representation
Plugin to automatically import FBT
- Host: GitHub
- URL: https://github.com/alexandernanberg/babel-plugin-fbt-import
- Owner: alexandernanberg
- License: mit
- Created: 2022-01-20T10:14:07.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-19T08:16:20.000Z (over 1 year ago)
- Last Synced: 2024-04-14T23:54:37.600Z (7 months ago)
- Language: JavaScript
- Size: 642 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# `babel-plugin-fbt-import`
A babel plugin to automatically import `fbt`.
## Installation
```
$ npm install babel-plugin-fbt-import --save-dev
```## Configuration
Add "babel-plugin-fbt-import" to the plugins list. It's **important** that is added before `babel-plugin-fbt` and `babel-plugin-fbt-runtime`, otherwise the latter will throw an error.
```json
{
"plugins": [
"babel-plugin-fbt-import",
"babel-plugin-fbt",
"babel-plugin-fbt-runtime"
]
}
```### Example
Input
```js
function App() {
return (
Hello
)
}export default App
```Output
```js
import { fbt } from 'fbt'function App() {
return (
Hello
)
}export default App
```## License
[MIT](/license)