2016-07-26 10 views
1

Webpackを実行しようとするとエラーが発生します。それは単に行方不明のパスをERRORと言います。私は下の構成でモジュールキーを削除するとエラーが消える:ここWebpack ERROR in missing path

module.exports = {                
entry: './client/scripts/app.js',           
output: {                 
    path: './docs/scripts/',             
    filename: 'bundle.js'             
},                   
module: {                 
    loaders: [{        
     test: /\.js$/,              
     loader: 'ng-annotate!',            
     exclude: /node_modules|docs\/bower_components/      
    }],                  
}                   
}; 

エラー出力です:

Hash: 396f0bfb9d565b6f60f0 
Version: webpack 1.13.1 
Time: 76ms 
    + 1 hidden modules 

ERROR in missing path 

私のWebPACKの設定は、私のプロジェクトのルートに座っています。フォルダ構造は以下の通りである:

client 
    scripts 
     app.js  
node_modules 
docs 
    scripts 
     bundle.js 
    bower_components   
webpack.config.js 

答えて

1

あなたはRegExpで間違いを持っ​​て、あなただけの1ローダー

を使用しているので、また ng-annotateした後、あなたが、 !を追加する必要はありません \

/
/node_modules|docs\/bower_components/ 
        ^^ 

を追加します

+1

それを修正しました。ありがとうございました。 – Sean

関連する問題