英文:
create-react-app: <script> tag files are replaced with index.html
问题
我在尝试在我的create-react-app中包含<script>
标签时,看到了与webpack相关的行为。
当我包含一个脚本标签(例如<script src="/public/myjs.js" />
)时,实际返回的是index.html。是否有需要更改的打包或路由规则,以确保应用程序实际包含我所请求的脚本?
英文:
I'm seeing behavior that seems webpack related while trying to include <script>
tags in my create-react-app.
When I include a script tag (like <script src="/public/myjs.js" />
), what is instead returned is index.html. Is there a packaging or routing rule I need to change to convince the app to actually include the script I am asking for?
答案1
得分: 1
在标准的Create React App(CRA)设置中,你在index.html文件中包含的
确定
评论