我想知道nuxt需要2或3秒才能进行热重载更改是否正常?例如,对于 Gatsby,Hot Reloads 是即时的。我错过了什么?
这是我的 nuxt 构建配置:
build: {
parallel: true,
cache: true,
extractCSS: process.env.NODE_ENV === 'production',
optimizeCSS: process.env.NODE_ENV === 'production',
transpile: ['vue-intersect'],
},
Run Code Online (Sandbox Code Playgroud)
我认为你的问题是因为你有一个属性components设置为true。
当设置为 true 或使用对象时,它将包含 nuxt/components 依赖项,并在您在模板中使用它们时自动导入您的组件(在 ~/components 中定义)。
...
// change to false, or remove this config.
components: true
...
Run Code Online (Sandbox Code Playgroud)
仅当您知道为什么需要将此属性设为 true 时才设置为 true。因此,您可以在 Nuxt 文档https://nuxtjs.org/api/configuration-components和 Github 文档https://github.com/nuxt/components 中找到更多相关信息。
| 归档时间: |
|
| 查看次数: |
3173 次 |
| 最近记录: |