Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Plugins error using this module with latest webpack 4.0.0-alpha.0 #681

Closed
Kielan opened this issue Dec 13, 2017 · 4 comments
Closed

Plugins error using this module with latest webpack 4.0.0-alpha.0 #681

Kielan opened this issue Dec 13, 2017 · 4 comments

Comments

@Kielan
Copy link

Kielan commented Dec 13, 2017

I have added to my wepback.common manifest in a typical webpack build using different configurations of loaders, but I think the issue has to do with webpack not reading this plugin properly

  plugins: [
    new ExtractTextPlugin("main.css") //also as {filename:"main.css", allChunks: true},
  ],

The webpack error is


Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.plugins[0] should be one of these:
   object { apply, ... } | function
   -> Plugin of type object or instanceof Function
   Details:
    * configuration.plugins[0] misses the property 'apply'.
      function
      -> The run point of the plugin, required method.
    * configuration.plugins[0] misses the property 'apply'.
      function
      -> The run point of the plugin, required method.
    * configuration.plugins[0] should be an instance of function
      -> Function acting as plugin

when logging the const that I import using require I see the extractText function when I log it. It would appear this import does not satisfy, Function acting as plugin, though it does have a new instance on it

@joshwiens
Copy link
Member

@Kielan - This will be taken care of in #676

@Kielan
Copy link
Author

Kielan commented Dec 14, 2017

https://github.com/Kielan/testWebpackErr

Example repo just for reference, switch webpack versions back and forth and notice the different console logs.

@Kielan
Copy link
Author

Kielan commented Jan 2, 2018

@d3viant0ne looks like the pr was declined, any update?

@Kielan
Copy link
Author

Kielan commented Jan 13, 2018

I found out that the issue is that I was using deepmerge dependency, webpack-merge seems to be an up to date alternative dependency https://github.com/survivejs/webpack-merge

@Kielan Kielan closed this as completed Jan 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants