Node.js/nuxt:修订间差异
来自康健生活
创建页面,内容为“== 引言 == == error == * Renderer resources are not loaded! Please check possible console errors and ensure dis *: 配置项有问题” |
|||
| 第1行: | 第1行: | ||
== 引言 == | == 引言 == | ||
== 内存 == | |||
<blockquote> | |||
<syntaxhighlight lang="bash"> | |||
npm install node-heapdump --save-dev | |||
</syntaxhighlight></blockquote> | |||
{{hc|nuxt.config.js|<syntaxhighlight lang="javascript"> | |||
var headpdump = require('heapdump') | |||
setInterval(function () { | |||
console.log('st headpdump') | |||
headpdump.writeSnapshot(function(err, filename) { | |||
console.log('dump written to', filename) | |||
}) | |||
}, 15000)</syntaxhighlight>}} | |||
打开 chrome 浏览器开发者工具 memory 选项卡,点击加载 hepdump。 | |||
== error == | == error == | ||
* Renderer resources are not loaded! Please check possible console errors and ensure dis | * Renderer resources are not loaded! Please check possible console errors and ensure dis | ||
*: 配置项有问题 | *: 配置项有问题 | ||