shaketbaby / directory-named-webpack-plugin

A Webpack plugin that treats a file with the name of directory as the index file
MIT License
182 stars 17 forks source link

Hook "before-existing-directory" does not working #25

Closed dmitrygorbenko closed 6 years ago

dmitrygorbenko commented 6 years ago

Hi, The plugin is not working for me. Webpack version is 3.10.0 Afaik, there is no such hook anymore: https://webpack.js.org/api/compiler/#event-hooks

Can you take a look ?

Thanks, Dima

shaketbaby commented 6 years ago

Thanks for reporting, but this plugin is a resolver plugin. I'll have a look

shaketbaby commented 6 years ago

I have just upgraded Webpack to 3.10.0 and all tests are still passing. Are you able to provide some more info about the error? And your Webpack configuration if that's okay.

shaketbaby commented 6 years ago

Are you still having the issue? Can't do much without more info as things are working fine for me.

BTMPL commented 6 years ago

This issue now exist in Webpack 4 where the plugin system was reworked, and there's no "before-existing-directory", there's "existingDirectory" hook now, but it looks like it's not compatible.

shaketbaby commented 6 years ago

Thanks, I'll release a new version that works will Webpack 4 ASAP.

shaketbaby commented 6 years ago

I have upgrade enhanced-resolve to v4 and all the tests are still passing, which should be the case as Resolver in Webpack v4 is backward compatible per the migration guide https://medium.com/webpack/webpack-4-migration-guide-for-plugins-loaders-20a79b927202

As suggested in the guide, have updated codes to use new plugin system. Tests are passing, will release soon after some more testing.

shaketbaby commented 6 years ago

Have released v4.0.0 to go with Webpack 4, closing this now.