Webpack define plugin causes: Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin

تعرفه تبلیغات در سایت
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس

آرشیو مطالب

جستجوگر

یافته ها در جستجو

    امکانات وب

    برچسب ها

    Vote count: 0

    I am trying to define a global variable to define config driven flows in my react app. To do this i add below definePlugin snippet in my webpack plugin section

    new webpack.DefinePlugin({
        'MODE': JSON.stringify('SERVER_DEV')
    })
    

    As soon as i do this my build starts to fail complaining of

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

    I am a bit clueless on how the error and cause are related. Please note if i remove this pluggin def things go back to normal :)

    Here is my webpack file:

    var path = require("path");
    var fs = require("fs");
    var webpack = require("webpack");
    module.exports = {
    
    module: {
      loaders: [
      {
        test: /.jsx$/,
        loader: 'babel-loader',
        query: {
          cacheDirectory: true,
          presets: ['es2015']
        }
      }, {
        test: /.css$/,
        loader: "style-loader!css-loader"
      },
      {
        test: /.woff(?v=d+.d+.d+)?$/,
        loader: "url-loader!url-loader?limit=10000&mimetype=application/font-woff"
      }, {
        test: /.woff2(?v=d+.d+.d+)?$/,
        loader: "url-loader!url-loader?limit=10000&mimetype=application/font-woff"
      }, {
        test: /.ttf(?v=d+.d+.d+)?$/,
        loader: "url-loader!url-loader?limit=10000&mimetype=application/octet-stream"
      }, {
        test: /.eot(?v=d+.d+.d+)?$/,
        loader: "url-loader!file-loader"
      }, {
        test: /.svg(?v=d+.d+.d+)?$/,
        loader: "url-loader!url-loader?limit=10000&mimetype=image/svg+xml"
      }
     ]
    },
    
    entry: path.resolve(__dirname, './src/client/app.jsx'),
    
     resolve: {
     modules: ['node_modules',path.join(__dirname, "src"),],
         alias: {
       react: path.resolve('node_modules/react'),
     },
     extensions:[".js", ".jsx", ".json"]
    },
    
    plugins: [
     new webpack.ProvidePlugin({
       $: "jquery",
       jQuery: "jquery"
     })
     ,
     new webpack.DefinePlugin({
         'MODE': JSON.stringify('SERVER_DEV')
     })
     ],
    };
    

    Any idea what this error is trying to tell me?

    asked 49 secs ago
    Blue Eagle

  • مطالب مرتبط
  • Trouble displaying a specific number in a loop without scientific notation in C++
  • Build to deploy guest on KVM hangs
  • I am unable to access the build server agent pool
  • Reference Error: Function is not defined.Webpack
  • Meteor Uncaught TypeError: Cannot read property 'helpers' of undefined
  • How to make Marker on GoogleMaps in iOS change it's position without animation
  • نویسنده : استخدام کار بازدید : 6 تاريخ : دوشنبه 27 شهريور 1396 ساعت: 1:53
    برچسب‌ها :