Skip to content

Commit

Permalink
docs: replace unsupported markups
Browse files Browse the repository at this point in the history
  • Loading branch information
leegeunhyeok committed Dec 8, 2023
1 parent 5e4501d commit e62a511
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Callout } from 'nextra/components'

# Basic Configuration

## Configuration
Expand Down Expand Up @@ -69,12 +71,13 @@ Transformer configurations.
- `transformer.jsc`: [jsc](https://swc.rs/docs/configuration/compilation) config in swc.
- `transformer.stripFlowPackageNames`: Package names to strip flow syntax from (Defaults to `['react-native']`)
- `transformer.fullyTransformPackageNames`: Package names to fully transform with [metro-react-native-babel-preset](https://github.com/facebook/react-native/tree/main/packages/react-native-babel-preset) from
:::warning
This may slow down code transformation
:::
- `transformer.additionalTransformRules`: Additional transform rules. This rules will be applied before phase of transform to es5
- For more details, go to [Custom Transformation](/configuration/custom-transformation)

<Callout type="warning">
`transformer.fullyTransformPackageNames` may slow down code transformation
</Callout>

### web

Web configurations.
Expand All @@ -89,7 +92,8 @@ For more details, go to [Custom Plugins](/configuration/custom-plugins)

## Types

<details><summary>Config</summary>
<details>
<summary>Config</summary>

```ts
interface Config {
Expand Down Expand Up @@ -214,7 +218,8 @@ interface Config {

</details>

<details><summary>Custom Transform Rules</summary>
<details>
<summary>Custom Transform Rules</summary>


```ts
Expand All @@ -235,7 +240,8 @@ type BabelTransformRule = TransformRuleBase<import('@babel/core').Options>;

</details>

<details><summary>ReportableEvent</summary>
<details>
<summary>ReportableEvent</summary>

```ts
type ReportableEvent = ClientLogEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Callout } from 'nextra/components'

# New Architecture

:::warning
<Callout type="warning">
[New Architecture](https://reactnative.dev/docs/the-new-architecture/landing-page) is experimental.
:::
</Callout>

## react-native-reanimated

Expand Down
16 changes: 10 additions & 6 deletions docs/pages/web/web-support.md → docs/pages/web/web-support.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { Callout } from 'nextra/components'

# Web Support

React Native Esbuild supports all platforms, including Web.

See a demo application built with a web target [here](https://rne-web-demo.vercel.app).
Expand All @@ -12,9 +16,9 @@ Install [react-native-web](https://necolas.github.io/react-native-web) and [reac
yarn add react-native-web react-dom
```

:::warning
`react-dom` version must match the `react` version in your package.json
:::
<Callout type="warning">
`react-dom` version must match with the `react` version in your package.json
</Callout>

### Create Web Entry

Expand Down Expand Up @@ -125,11 +129,11 @@ exports.default{

You can replace the `{{name}}` format strings in template through the `web.placeholders` configuration.

:::info
<Callout type="info">
The reserved placeholder names are `_` prefixed name. It will be overridden your placeholders.

- `_bundle`: the bundle file path
:::
</Callout>

```js
// react-native-esbuild.config.js
Expand All @@ -138,7 +142,7 @@ exports.default = {
placeholders: {
placeholder_name: 'Hello, world!'
// reserved placeholder name.
// it will be overridden by Esbuild.
// It will be overridden by bundler.
_bundle: 'custom value',
},
},
Expand Down
3 changes: 2 additions & 1 deletion docs/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config: DocsThemeConfig = {
},
head: () => {
const { asPath, defaultLocale, locale } = useRouter()
const { frontMatter } = useConfig()
const { frontMatter, title } = useConfig()
const url =
'https://react-native-esbuild.vercel.app' +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`)
Expand All @@ -42,6 +42,7 @@ const config: DocsThemeConfig = {
property="og:description"
content={frontMatter.description || 'Document'}
/>
<title>{`${title} - RNE`}</title>
</>
)
}
Expand Down

2 comments on commit e62a511

@vercel
Copy link

@vercel vercel bot commented on e62a511 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 16.21% 328/2023
🔴 Branches 16.3% 82/503
🔴 Functions 10.8% 65/602
🔴 Lines 15.5% 298/1922

Test suite run success

83 tests passing in 10 suites.

Report generated by 🧪jest coverage report action from e62a511

Please sign in to comment.