"Quickly Try JSX" does not work on a local file
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 11.8k
- 分支
- 7.9k
- 平均合併
- 1 天 11 小時
- 30 天內合併 PR
- 11
描述
In Docs > Installation > Add React to a Website > Optional : Try React with JSX > Quickly Try JSX, the instructions say:
...add this
<script>tag to your page:<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>Now you can use JSX in any
<script>tag by addingtype="text/babel"attribute to it.
However, after adding these lines to a local HTML file, opening it in browser gives the following error:
Access to XMLHttpRequest at 'file:///C:/Users/.../like_button.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Docs > Installation > Add React to a Website > Optional: Try React with JSX > Quickly Try JSX 開始,並從本機 HTML 檔案重現這些指示。判斷使用者需要執行哪些操作才能避免回報的 file:// CORS 錯誤,然後更新指示,讓文件中的快速入門路徑能夠正常運作,或清楚說明必要的提供方式。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, react
- 領域
- documentation
- Issue 類型
- 文件
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100