2017-07-25 83 views
0

我在Visual Studio Code中開始了我的網站項目,並且它在數天內運行良好。我發現了Atom並決定轉向它。不知怎的,每當我開始在凌動開發服務器,每個Vue的組件吐出:Vue JS dev服務器在Atom中不起作用

Console output (pastebin)

"Error: "extract-text-webpack-plugin" loader is used without the corresponding 
plugin" 

和網頁只呈現

Cannot GET/

開發服務器在Visual Studio代碼開始罰款不是凌

回答

0

我有同樣的問題與CMD Win7上運行npm run dev。 我不知道,因爲我沒有明確要求這個插件,當我開始這個錯誤沒有發生在我身上。

由於我也開始出現這個錯誤,我已經嘗試設置這個issue report from the official repo提供,我試着玩。

最後我結束了編輯webpack.dev.conf.js加入這個特定的插件插件項,如下所示:

// File header with other Imports 
var utils = require('./utils') 
// ... 
var ExtractTextPlugin = require('extract-text-webpack-plugin') 

// Then in Module definition 
module.exports = merge(baseWebpackConfig, { 

    // ... other keys for module 

    plugins: [ 

     // .. other plugins 

     // .. I copied this line from the webpack.prod.conf.js 
     new ExtractTextPlugin({ 
     filename: utils.assetsPath('css/[name].[contenthash].css') 
     }), 

那麼有可能會更好,更美的解決方案。 這只是一個似乎爲我解決它。 由於我是新來VueJs和我只使用開發服務器在與自動重此刻,其他answeres可能是有點更精緻。