Summary: Use docusaurus new config option to force trailing slashes for all routes and fail build when extensions are not specified in markdown links to prevent flapping urls that lead to 404 in certain situations. Reviewed By: jknoxville Differential Revision: D32533292 fbshipit-source-id: a2d5fdff396b3bb4319893634dd637275ea9f598
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
---
|
|
id: loading-custom-plugins
|
|
title: Dynamically Loading Plugins
|
|
---
|
|
|
|
<FbInternalOnly>
|
|
|
|
<div class="warning">
|
|
|
|
Inside Facebook, plugins sources are stored and loaded from `~/fbsource/xplat/sonar/desktop/plugins`,
|
|
in which case no further configuration is needed.
|
|
|
|
If your team uses Flipper plugins that are stored outside `fbsource`, please follow your team specific instructions.
|
|
|
|
</div>
|
|
|
|
</FbInternalOnly>
|
|
|
|
Flipper loads and runs plugins it finds in a configurable location. The paths searched are specified in `~/.flipper/config.json`. These paths, `pluginPaths`, should contain one folder for each of the plugins it stores. An example config setting and plugin file structure is shown below:
|
|
|
|
`~/.flipper/config.json`:
|
|
```
|
|
{
|
|
...,
|
|
"pluginPaths": ["~/flipper-plugins"]
|
|
}
|
|
```
|
|
Plugin File example structure:
|
|
```
|
|
~ flipper-plugins/
|
|
my-plugin/
|
|
package.json
|
|
src/index.tsx
|
|
dist/bundle.js
|
|
```
|
|
|
|
<OssOnly>
|
|
|
|
Note: when using `npx flipper-pkg init` for scaffolding, as explained in the [tutorial](../tutorial/intro.mdx) or on the next page, the path should be configured automatically for you in most cases.
|
|
|
|
</OssOnly>
|
|
|
|
Typically, the above setup is only needed if you are developing plugins.
|
|
To consume plugins, it is recommended to use one of the existing [distribution mechanisms](plugin-distribution.mdx) instead.
|