您正在浏览 Nuxt 2 文档。前往 Nuxt 3 文档, 或了解更多关于 Nuxt 2 长期支持

本地模块

使用 ngrok 设置隧道的本地模块


本示例中:

  • modules/ngrok/index.js 在开发模式下将 ngrok 的公共 URL 添加到 Nuxt CLI。
  • pages/index.vue 显示来自 ngrok 的公共 URL。
  • nuxt.config.js 使用 buildModules 属性注册模块。
Loading Sandbox...
Edit this page on GitHub Updated at Tue, Apr 14, 2026