Laravel5.4는 Vue입니다.js 준비 사용하기
                                            
                                                
                                                
                                                
                                                
                                                
                                                 2786 단어  Laravellaravel5.4Vue.js
                    
의존성 패키지에 넣기
우선 npm install로 의존포장을 하겠습니다.
npm install편역하다
npm run dev $ npm run dev
> npm run development
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
 95% emitting
 ERROR  Failed to compile with 2 errors
 error  in ./resources/assets/sass/app.scss
Module build failed: Error: ENOENT: no such file or directory, scandir '/home/service/cocoa/node_modules/node-sass/vendor'
npm install node-sass재도전npm run dev  DONE  Compiled successfully in 4712ms
                                                                                                    Asset     Size  Chunks                    Chunk Names
  fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1  20.1 kB          [emitted]
fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2?448c34a56d699c29117adc64c43affeb    18 kB          [emitted]
 fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff?fa2772327f55d8198301fdb8bcfc8158  23.4 kB          [emitted]
  fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf?e18bbf611f2a2e43afc071aa2f4e1512  45.4 kB          [emitted]
  fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg?89889688147bd7575d6327160d64e760   109 kB          [emitted]
                                                                                               /js/app.js   1.2 MB       0  [emitted]  [big]  /js/app
                                                                                             /css/app.css   147 kB       0  [emitted]         /js/app
Vue 구성 요소 표시
기본적으로 준비된 구성 요소 사용하기
resources/assets/js/components/Example.vue
resorces/assets/js/app.js
...
Vue.component('example', require('./components/Example.vue'));
const app = new Vue({
    el: '#app' #
});
어쨌든 먼저 말씀드리겠습니다.
<div id="app">
    <example></example>
</div>
 
 이(가) 표시됩니다.
Reference
이 문제에 관하여(Laravel5.4는 Vue입니다.js 준비 사용하기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/namixc/items/71b1494e87b55f97d8ea텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)