最终加载程序未返回Buffer或String

时间:2019-06-21 13:18:17

标签: reactjs

我正在使用twilio api在react-redux中创建一个聊天机器人应用,但出现以下错误“ ERROR in 模块构建失败:错误:最终加载程序未返回缓冲区或字符串     在NormalModule.onModuleBuild(/home/langton/Desktop/twil/react-twilio-create/node_modules/webpack-core/lib/NormalModuleMixin.js:“

below is my webpack:

var path = require('path');
var webpack = require('webpack');

var port = 8080;
var publicPath = '/assets/';


module.exports = {
  entry: './src/main.js',
  output: {
    path: path.resolve(__dirname, 'build/assets'),
    publicPath: "/assets/",
    filename: 'app.js',
  },
  devServer: {
    contentBase: "build/",
    disableHostCheck: true,
    proxy: {
      "/api/*": {
        target: "http://localhost:3000",
        secure: false
      }
    }
  },
  module: {
    loaders: [
      {
        test: /.js?$/,
        loader: 'babel-loader',
        exclude: /node_modules/,
        query: {
          presets: ['es2015', 'react']
        }
      },
      {
        test: /\.css$/,
        loader: 'style!css'
      }
    ]
  },
};


i am just expecting the code to just compiled

0 个答案:

没有答案