-
Notifications
You must be signed in to change notification settings - Fork 468
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Environment
win11, Command Prompt
Version
v20.10.0
Version
`-- (empty)
Link to minimal reproduction
Step to reproduce
我在跟着教程尝试服务器部署方案时遇到两个问题:
(1)代码里没有使用 *.prod.js 对应 production environment
(2)出现错误 __VUE_PROD_DEVTOOLS__ is not defined, 应该是内置插件没有配置好导致的
以下是我在浏览器 console 看见的错误:
You are running a development build of Vue.
Make sure to use the production build (*.prod.js) when deploying for production.
runtime-core.esm-bundler.js:8070 Uncaught ReferenceError: __VUE_PROD_DEVTOOLS__ is not defined
at runtime-core.esm-bundler.js:8070:63
复现步骤 (~15min):
我看的是官网的教程:
https://opentiny.design/tiny-engine#/help-center/course/backend/51
- 我把 tiny-engine, tiny-engine-data-center 和 tiny-engine-webservice clone 到同一个 directory 里, e.g.:
(root)/tiny-engine(root)/tiny-engine-data-center(root)/tiny-engine-webservice
- 前面根据教程设置好 tiny-engine, tiny-engine-data-center 和 tiny-engine-webservice, 并使用了
pnpm serve:frontend运行 tiny-engine 的前端,可以正常启动及显示,没有错误 - 服务部署:前端资源打包 (✅)
- 在
(root)/tiny-engine里,我使用了pnpm run build:plugin && pnpm run build:prod来完成 (官网教程漏了pnpm run build:plugin)
- 在
- Web Service 整改 第一步:存放静态资源, 第二步:安装并配置渲染引擎, 第三步:配置路由 (✅)
- 在
(root)/tiny-engine-webservice里,我使用了del /q app\public\* app\view\* && xcopy ..\tiny-engine\packages\design-core\dist\ app\public\ /s /e /Y && move app\public\*.html app\view\来完成第一步 - 第二步和第三步都根据指示修改文件了
- 在
- 完成后运行
pnpm run dev, 然后访问http://localhost:7011/entry?id=918&type=app, 出现上述错误
What is expected
预期浏览器 console 没有出现以下信息和错误:
You are running a development build of Vue.
Make sure to use the production build (*.prod.js) when deploying for production.
runtime-core.esm-bundler.js:8070 Uncaught ReferenceError: __VUE_PROD_DEVTOOLS__ is not defined
at runtime-core.esm-bundler.js:8070:63
What is actually happening
No response
Any additional comments (optional)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request