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

Caching option does not work #45

Closed
binarykitchen opened this issue Mar 9, 2015 · 5 comments · Fixed by #109
Closed

Caching option does not work #45

binarykitchen opened this issue Mar 9, 2015 · 5 comments · Fixed by #109

Comments

@binarykitchen
Copy link

It seems that setting cache to true has no impact on webpack's gulp plugin.

@shama
Copy link
Owner

shama commented Mar 9, 2015

Does it work directly with webpack?

@binarykitchen
Copy link
Author

No idea, documentation does not say much.

@shama
Copy link
Owner

shama commented Mar 9, 2015

You should probably make sure that is working first. Since this plugin doesn't do any caching, just interfaces with webpack itself, it's likely not an issue here. For general questions on how webpack works, try their https://gitter.im/webpack/webpack channel or stackoverflow. If you figure it out please add it to webpack's docs, they are freely editable.

@shama shama closed this as completed Mar 9, 2015
@dazld
Copy link

dazld commented May 6, 2015

This is actually an issue with the plugin, as it is creating a new instance of webpack on every run, as far as I can tell.

@jmurzy
Copy link
Contributor

jmurzy commented Mar 16, 2016

@shamathat'd be great if we could pass an instance of webpack to the plugin rather than webpack itself.

const compiler = webpack(webpackConfig)
...
.pipe(webpackStream(compiler, cb))

For caching to work, we have to use the same instance on subsequent compiles.

Update I've made a PR, #109, that fixes this by caching webpack internally. No API change was necessary.

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

Successfully merging a pull request may close this issue.

4 participants