2017-01-15 1 views
0

이것은 이상한 질문 일지 모르지만 Webpack을 처음 사용하기 때문에 정상적으로 작동하는지 궁금합니다. eslint 오류 메시지는 오류 메시지 위에 "청크"가있는 매우 긴 것 같습니다. 어떤 경우에는 상단의 "덩어리"가 내 예제보다 훨씬 길어서 제거 할 수있는 방법을 찾지 못했습니다. 왜 내가 필요로하는지 알 수 없습니다. 추가하는 것을 잊어 버린 구성이 있습니까?webpack eslint 오류 메시지

나는 VueJS webpack simple template을 사용하고 있으며 그것에 eslint 로더를 추가했습니다. 나 또한 Webpack에 대한 Stylelint 플러그인을 시도하고 오류 메시지가 동일하게 보였다. (모든 "덩어리"때문에 혼란 스럽다.) Webpack 2 docs on Stats에서

Hash: 84d43d1c3599310c692c 
    Version: webpack 2.1.0-beta.28 
    Time: 227ms 
    chunk {0} build.js (main) 481 kB [entry] 
     [46] ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/component/Component.vue 182 bytes {0} [built] 
     [88] ./src/component/Component.vue 1.76 kB {0} [built] [1 error] 
     [89] ./~/vue-loader/lib/template-compiler.js?id=data-v-104cb767!./~/vue-loader/lib/selector.js?type=template&index=0!./src/component/Component.vue 412 bytes {0} [built] 
     + 94 hidden modules 

    ERROR in ./src/App.vue 

    /Users/dd/Documents/vue/src/App.vue 
     16:5 error Expected indentation of 4 spaces but found 2 indent 
     19:8 error Missing semicolon        semi 
     21:4 error Missing semicolon        semi 

    ✖ 3 problems (3 errors, 0 warnings) 

    @ ./src/main.js 2:0-28 
    @ multi main 

    ERROR in ./src/component/Component.vue 

    /Users/dd/Documents/vue/src/component/Component.vue 
     9:5 error Expected indentation of 4 spaces but found 2 indent 
     13:8 error Missing semicolon        semi 
     15:4 error Missing semicolon        semi 

    ✖ 3 problems (3 errors, 0 warnings) 

    @ ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue 11:0-50 
    @ ./src/App.vue 
    @ ./src/main.js 
    @ multi main 

답변

1

:

스탯 옵션은 정확하게 번들 정보가 표시됩니다 무엇을 제어 할 수 있습니다. quiet 또는 noInfo을 사용하지 않으려는 경우 좋은 정보가 될 수 있습니다. 일부 번들 정보를 원하지만 전부는 아니기를 원하기 때문입니다. 에서

당신의 webpack.config.js 당신이 속성 stats을 가진 최고 수준의 수출에 devServer 객체를 제공 할 수 있습니다.

는 덩어리의 표시를 해제하여 설정이를 추가하려면

module.exports = { 
    ..., 

    devServer: { 
    stats: { 
     chunks: false 
    } 
    }, 

    ... 
}