Node 调试

  • res debug 启动应用
  • 然后复制 chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9999/ws_proxy 到 chrome 地址栏,进入 Sources Tab,在指定的代码处打断点即可调试,更多请见 vscode 调试
res debug

构建调试

  • res build webpack 编译, 会进行文件 hash, minify
  • res tsc TypeScript 编译
  • res print 检查 Webpack 配置 是否生效或者正确
  • res build webpack 编译
res build // webpack 编译

res build --server // webpack 编译后,启动静态 server 访问直接静态文件
  • res tsc TypeScript 编译 Node 端(本地直接 ts-node 运行,发布模式需要编译成 js 文件)
res tsc
  • res print 检查 Webpack 配置 是否生效或者正确
res print --help  // 查看命令使用

res print   // 打印 webpack 配置

res print --web 打印前端 webpack 配置

res print -n module.rules[0].use[0] // 通过 lodash 获取配置指定节点

Author: sky
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source sky !
 Previous
构建发布 构建发布
构建文件TypeScript Node 构建npm run tscTypeScript 前端工程构建npm run build项目打包部署先运行 npm run tsc 和 npm run build 构建 TypeScript Node 代码和 TypeScript 前端代码项目代码和构建代...
2020-04-18 sky
Next 
客户端渲染(CSR) 客户端渲染(CSR)
React Node 端代码实现服务端只渲染 HTML 的 HTML,HEAD,BODY 标签结构,具体 BODY 内容由 ctx.renderClient 进行 React 客户端渲染; 文件名为 webpack entry 的文件名,注入的页面 JS 文件为 app/public 文件。$...
2020-04-18 sky