英文:
Run html file in command powershell
问题
可以在PowerShell命令中运行React的JS/TS文件,而无需执行npm run start
吗?我只想要一次点击,文件就会在Chrome或Firefox中打开。我只是在向大家询问,如果你不能帮助,没关系。
英文:
Is it possible to run the react js/ts file in the powershell command without having to npm run start
, so I want only one click and the file appears in Chrome or in Firefox
I'm just asking everyone, if you can't help, it's ok.
答案1
得分: 1
我不认为这是可能的,因为React代码只是JS代码。它使用Babel(如果没有错的话)生成JS代码,然后将其插入到一个HTML文档中的ID为“root”的
英文:
I dont think it is possible, because the React code is a just a JS code. It uses Babel (if not mistaken) to generate JS code that is being inserted in one HTML document into div with "root" id. It might look like a valid HTML, but it is not.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
- html
- powershell
- reactjs
评论