반응형
nuxt 사용 시 핫 새로고침을 끌 수 있습니까?
vue/nuxt 앱을 다음과 같이 시작했습니다.
npx create-nuxt-app
또한 개발 서버를 실행할 때는 핫 새로고침 기능을 꺼야 합니다.나는 어디에서도 그것을 할 수 있는 선택지를 찾을 수 없다.nuxt 명령 도움말에는 다음과 같은 내용이 있습니다.
nuxt --help
Description
Starts the application in development mode (hot-code reloading, error
reporting, etc)
Usage
$ nuxt dev <dir> -p <port number> -H <hostname>
Options
--port, -p A port number on which to start the application
--hostname, -H Hostname on which to start the application
--spa Launch in SPA mode
--universal Launch in Universal mode (default)
--config-file, -c Path to Nuxt.js config file (default: nuxt.config.js)
--help, -h Displays this message
핫 새로고침을 끄는 스위치가 없습니다.제 생각에 그건 아마...nuxt.config.js파일을 만들었는데, 가능한 옵션을 찾을 수 없습니다.
https://nuxtjs.org/api/configuration-build 페이지부터 문서를 살펴보았지만 찾을 수 없었습니다.
아래는 완벽한 솔루션은 아니지만 적어도 핫 새로고침은 중지됩니다.
웹 팩 3 및 Chrome(67.0.3396.99) DevTools를 사용하는 Nuxt 1.4.0의 경우:
- Chrome에서 개발자 도구 열기
- 오른쪽 상단에 있는 세 개의 점(...)을 클릭합니다.
- [기타 툴]-> [차단 요청]을 클릭합니다.
- "요청 차단 활성화"를 클릭하고 "*hot-update.json"을 추가합니다.
그러면 핫 새로고침이 중지되지만 오류 메시지가 발생합니다.
누군가에게 도움이 될 수도 있습니다.-그것은 나에게 도움이 되었습니다. :)
nuxt.config.js에서
[