samvloeberghs / webpack-load-plugins

Automatically load in webpack plugins
https://github.com/samvloeberghs/webpack-load-plugins
21 stars 0 forks source link

webpack plugins included #2

Open PatrickJS opened 8 years ago

PatrickJS commented 8 years ago

are the webpack plugins also included? for example webpack.optimize. UglifyJsPlugin

samvloeberghs commented 8 years ago

sorry for the late answer, did not see the notice..

only the webpack plugins defined in the packages.json are included: https://github.com/samvloeberghs/webpack-load-plugins/blob/master/index.js#L25 & https://github.com/samvloeberghs/webpack-load-plugins/blob/master/index.js#L55

PatrickJS commented 8 years ago

can we also include the default plugins so the user doesn't need to require "webpack"

samvloeberghs commented 8 years ago

I could take a look into that, will see what I can do in what timespan :)

PatrickJS commented 8 years ago

ping

samvloeberghs commented 8 years ago

How do you see this @gdi2290? I'm struggling with what would be a good approach on this?

Right now you should include webpack using require('webpack') and then use something like: new webpack.optimize.OccurenceOrderPlugin(true). How would this help to put these into the "webpack-load-plugins" plugin? It would mean I just need to require webpack as a whole, at first sight.

samvloeberghs commented 7 years ago

@gdi2290 bump!

PatrickJS commented 7 years ago

ya just auto add the webpack plugins plugins.namedModules -> NamedModulesPlugin plugins.define -> DefinePlugin plugins.dedupe -> DedupePlugin plugins.uglifyJs -> UglifyJsPlugin