Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't accept config as a function #208

Open
stevenvachon opened this issue Oct 18, 2018 · 2 comments
Open

Doesn't accept config as a function #208

stevenvachon opened this issue Oct 18, 2018 · 2 comments

Comments

@stevenvachon
Copy link

For mode, the config needs to be a function: https://webpack.js.org/concepts/mode/

webpack.config.js:

module.exports = (env, argv) => ({
    ...
});

gulpfile.js:

.pipe(webpackStream( require('./webpack.config.js') )

result:

[17:28:17] webpack-stream - No files given; aborting compilation
@Lc0rE
Copy link

Lc0rE commented Feb 1, 2019

I'm having the same issue. Any update on this?

@ebuchholz17
Copy link

I was able to just call the function like this:

.pipe(webpackStream(require('./webpack.config.js')(undefined, {}))

If you need env and argv I think you could find a way to pass them into gulp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants