简体   繁体   English

反应:无需构建即可运行生产

[英]React: Run on production without build

Before a deployment to production environment, people usually compile, build and compress react code. 在部署到生产环境之前,人们通常会编译,构建和压缩React代码。 I know that makes file less-size and makes site faster. 我知道这会使文件更小并且使站点更快。

I am working for a fast iterative project now and some time I need to check the issue even on production server. 我现在正在为一个快速迭代的项目工作,有时我甚至需要在生产服务器上检查该问题。 So, I assume if there is a solution to run my development app just as local style. 因此,我假设是否有一种解决方案可以像本地样式一样运行我的开发应用程序。

If I just use 'npm install', 'npm start' command on the production server, I think it should work. 如果我只在生产服务器上使用“ npm install”,“ npm start”命令,我认为它应该可以工作。 However, I am not sure if it is stable and I hope I can use normal deployment tool, such as IIS etc. 但是,我不确定它是否稳定,希望我可以使用正常的部署工具,例如IIS等。

Here my question is: is there any way to run development code on IIS? 我的问题是: 有没有办法在IIS上运行开发代码?

Thanks in advance. 提前致谢。 :) :)

Here's an example: 这是一个例子:

http://dimaqq.github.io/kanji-sudoku/ http://dimaqq.github.io/kanji-sudoku/

It's ES6 + React.js all in a static HTML, all transpiled by Babel in the browser. 这是ES6 + React.js,都是静态HTML,由Babel在浏览器中转译。

Nowadays ES6 is supported natively, and the above can be simplified. 如今,ES6已获得本机支持,并且可以简化以上内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在不缩小的情况下构建 React 的生产版本? - How to build a production version of React without minification? React-Boilerplate在没有端口的情况下进行生产 - React-Boilerplate run production without port 有没有办法让我在不使用 Express 的情况下包含 React 生产构建文件? - Is there a way for me to include the React production build files without using Express? npm 运行构建生产不分发生产 - npm run build production does not distribute the production Node/WebpackDevServer/react-scripts,删除“To create a production build, use npm run build”消息 - Node/WebpackDevServer/react-scripts, remove “To create a production build, use npm run build” message on start 对生产进行反应,资产未加载 - react production build, assets not loading 生产构建中未定义require(react.production.min.js) - require is not defined (react.production.min.js) on production build 生产构建 React 上未加载 Multer 图像? - Multer Image Not loaded on Production Build React? React state 钩子适用于开发,但不适用于构建(生产) - React state hooks work on development but not on build (production) 使用 Docker 构建为生产创建 React 应用程序? - Creating React application for production with Docker build?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM