Git Product home page Git Product logo

Comments (6)

shama avatar shama commented on May 28, 2024

I would do something like this:

var webpack = require('webpack')
var wpstream = require('gulp-webpack')

gulp.task('webpack', ['dist'], function() {
  return gulp.src('test/units/**/*.js')
    .pipe(plumber())
    .pipe(wpstream({
      /* ... */
      plugins: [
        new webpack.optimize.OccurenceOrderPlugin(true)
      ]
    }, webpack)) // Pass your instance of webpack to gulp-webpack
    .pipe(gulp.dest('test'));
})

from webpack-stream.

DarkPark avatar DarkPark commented on May 28, 2024

not a perfect solution as in my node_modules now will be two copies of webpack module - one in the root and one inside gulp-webpack
almost 9 Mb each
a little bit too much to include one 2.7 Kb plugin

from webpack-stream.

shama avatar shama commented on May 28, 2024

Ah ok, well good lucking finding a solution!

from webpack-stream.

DarkPark avatar DarkPark commented on May 28, 2024

I've suggested it in the beginning.
Just a link to the inner webpack in the gulp-webpack module export should be enough.

from webpack-stream.

shama avatar shama commented on May 28, 2024

I'm not a fan of exposing internal dependencies but now with v1.1.0 you can access it with:

var webpack = require('gulp-webpack');
/* ... */
new webpack.webpack.optimize.OccurenceOrderPlugin(true)

Fingers crossed it doesn't bite me later. Purposely not documenting as I rather users just install/use webpack directly but here you go.

from webpack-stream.

DarkPark avatar DarkPark commented on May 28, 2024

thank you very much
works like a charm :)

from webpack-stream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.