2017-07-25 32 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可能是有点更精致。