Title: Embed React Build
Author: nsei
Published: <strong>2021 年 5 月 15 日</strong>
Last modified: 2021 年 9 月 12 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/embed-react-build.svg)

# Embed React Build

 由 [nsei](https://profiles.wordpress.org/nsei/) 開發

[下載](https://downloads.wordpress.org/plugin/embed-react-build.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/embed-react-build/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/embed-react-build/#reviews)
 * [開發資訊](https://tw.wordpress.org/plugins/embed-react-build/#developers)

 [技術支援](https://wordpress.org/support/plugin/embed-react-build/)

## 外掛說明

This plugin reads the `asset-manifest.json` file in your ReactJS build and includes
it in wordpress and allows you to run your application anywhere in wordpress.

### Usage

You can run your application embedded in wordpress by typing the following shortcode
in the WordPress text editor.

    ```
    [embed_react_build application_id="root" url="https://react-default.netlify.app"]
    ```

### Shortcode Parameters

 * `application_id` — The name of the container where the React application is mounted.
   (
   default: root) (required)
 * `url` — The URL address of the React Build.
    (required)
 * `staging_url` — The URL address of the React Staging Build. Once defined, you
   can access the staging build by typing `?test=true` at the end of the url.
    (
   optional)

## 常見問題集

### Is there a requirement for the plugin?

The only requirement for the plugin is that React Build with the following conditions.

 1. You need to compile with a version higher than 3.2.0 of the [Create React App](https://create-react-app.dev/)
    tool so that your build dependencies are read and understood by the plugin.
 2. You need to define `PUBLIC_URL` in the `.env` file for the structure dependencies
    to be properly integrated into the page.
     **For example:** [https://github.com/nurullah/react-default/blob/master/.env](https://github.com/nurullah/react-default/blob/master/.env)

### Where can I embed React Build?

You can run the React Build by typing the shortcode in the text editor from within
the post, page or widgets.

### Will I always need to prepare the shortcode manually?

In the new versions of the plugin, component/block will be created for page builders
such as Gutenberg, WPBakery, Elementor. After those versions, you will be able to
integrate your React application more easily.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Embed React Build〉的開發相關工作。

參與者

 *   [ nsei ](https://profiles.wordpress.org/nsei/)

[將〈Embed React Build〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/embed-react-build)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/embed-react-build/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/embed-react-build/)，或透過 
[RSS](https://plugins.trac.wordpress.org/log/embed-react-build/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/embed-react-build/)。

## 變更記錄

#### 1.0.3

 * Fixed issue when copying sample shortcode.

#### 1.0.2

 * WordPress 5.8 compability tested.

#### 1.0.1

 * Readme.txt updated.

#### 1.0.0

 * Plugin name renamed.

#### 0.4.4

 * Readme.txt updated.

#### 0.4.3

 * Readme.md updated.

#### 0.4.2

 * Readme files created.

#### 0.4.1

 * Staging URL parameter added to the shortcode.

#### 0.4

 * The manifest.json file is loaded after runtime.

#### 0.3.1

 * PHP notice fixed.

#### 0.3

 * Shortcode created.

#### 0.2

 * Class created for plugin.

#### 0.1

 * Initial

## 中繼資料

 *  版本 **1.0.3**
 *  最後更新 **5 年前**
 *  啟用安裝數 **20+**
 *  WordPress 版本需求 ** 4.7 或更新版本 **
 *  已測試相容的 WordPress 版本 **5.8.13**
 *  PHP 版本需求 ** 7.0 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/embed-react-build/)
 * 標籤:
 * [build](https://tw.wordpress.org/plugins/tags/build/)[embed](https://tw.wordpress.org/plugins/tags/embed/)
   [react](https://tw.wordpress.org/plugins/tags/react/)
 *  [進階檢視](https://tw.wordpress.org/plugins/embed-react-build/advanced/)

## 評分

這個項目尚無任何評論記錄。

[Your review](https://wordpress.org/support/plugin/embed-react-build/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/embed-react-build/reviews/)

## 參與者

 *   [ nsei ](https://profiles.wordpress.org/nsei/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/embed-react-build/)