반응형
.vue 단일 파일 구성 요소를 NWj와 함께 사용할 수 없음
Good Afdom, 나는 0.26.1 버전에서 NWjs를 사용하여 데스크톱 앱을 만들고 있다. 나는 XfCE4와 함께 Ubuntu 서버 16.04를 사용하여 Vue를 사용하고자 하는 앱을 개발하고 있다.데이터 부분에는 JS, UI 구성 요소에는 Buefy. 하지만 UI Vue Framework는 단일 파일 .vue 파일 구성 요소를 사용하기 때문에 이 오류에 직면하게 되었다.
Uncaught SyntaxError: Unexpected token <
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:600:28)
at Object.Module._extensions..js (module.js:653:10)
at Module.load (module.js:555:32)
at tryModuleLoad (module.js:518:12)
at Function.Module._load (module.js:510:3)
at Module.require (module.js:580:17)
at require (internal/module.js:11:18)
at self.require (<anonymous>:11:26)
웹팩을 사용해 번들 js 파일을 문제없이 만들 수 있었지만 NWjs는 단일 파일 컴포넌트의 HTML 태그를 구문 분석할 것을 고집한다.
모의고사 구성 요소는 다음과 같다.
<template>
<section>
<span>
<b-field>
<b-switch v-model="bars">Bars</b-switch>
</b-field>
<b-datepicker inline v-model="date" :events="events" indicators="indicators">
</b-datepicker>
</span>
</section>
</template>
<script>
export default {
}
</script>
<style lang="sass" scoped>
</style>
이것에 대한 어떤 빛도 아주 귀중한 도움이 될 거야, 미리 고마워.
Vue-cli 및 Vue init를 사용하여 해결.
반응형
'IT이야기' 카테고리의 다른 글
Difference between the created and mounted events in Vue.js (0) | 2022.03.20 |
---|---|
홈 페이지 클릭 없이 하위 페이지로 직접 이동할 때 라우터 브라우저 반응으로 인해 "404 Not Found - nginx" 오류가 발생함 (0) | 2022.03.20 |
외부 URL에 대한 각도 매트 버튼 링크 (0) | 2022.03.19 |
리액트-라우터 V6 "url 변경은 있지만 구성 요소가 렌더링하지 않음" (0) | 2022.03.19 |
".../node_modules/rxjs/Rx"에 내보낸 멤버 '던지기'가 없음 (0) | 2022.03.19 |