Files
flipper/website
Pascal Hartig 13f9fa64ff Fix style guide generation
Summary:
The website generation fails on newer versions of `flipper-plugin` as it contains an import-time side effect. This leads to this error during build time:

```
[ERROR] Docusaurus server-side rendering could not render static page with path /docs/extending/style-guide/.
[INFO] It looks like you are using code that should run on the client-side only.
To get around it, try using `<BrowserOnly>` (https://docusaurus.io/docs/docusaurus-core/#browseronly) or `ExecutionEnvironment` (https://docusaurus.io/doc
s/docusaurus-core/#executionenvironment).
It might also require to wrap your client code in `useEffect` hook and/or import a third-party library dynamically (if any).
```

This ain't pretty but by wrapping the entire file in a single function that conditionally imports the `flipper-plugin` if we are indeed in a browser environment fixes the problem.

Reviewed By: antonk52

Differential Revision: D43773298

fbshipit-source-id: 8e1099249626ca9fe745ce51014491fe9674a5a4
2023-03-03 11:04:13 -08:00
..
2020-04-23 05:58:39 -07:00
2023-03-03 11:04:13 -08:00
2022-11-02 05:23:55 -07:00
2022-02-22 08:25:28 -08:00
2022-07-05 08:19:08 -07:00
2023-02-15 10:29:36 -08:00
2023-02-15 10:29:36 -08:00