mariusbalcytis / webpack-bundle

Bundle to Integrate Webpack into Symfony
MIT License
122 stars 36 forks source link

By default loading config from config/webpack.config.js and not app/config/webpack.config.js #87

Open ndyakov opened 6 years ago

ndyakov commented 6 years ago

I think this should be %kernel.root_dir% not %kernel.project_dir%

https://github.com/mariusbalcytis/webpack-bundle/blob/1737c73cae2d3501272c960a6292ccbd533d9b74/src/DependencyInjection/Configuration.php#L71

mvrhov commented 6 years ago

AFAIK this is correct. the project dir is the dir where composer.json resides. and if you use new symfony 4 dir structure then the above translates to config/webpack.config.js

ndyakov commented 6 years ago

@mvrhov This is right, probably a check of \Symfony\Component\HttpKernel\Kernel::VERSION should be done? What do you think about that, I can do a fast patch if you agree with this.

mariusbalcytis commented 6 years ago

Unfortunately project structure is not tightly coupled with symfony version. Furthermore, version 1.0 was already released, and this would be backward incompatible change. This behavior is explained in upgrade.md file. Of course, if one is installing fresh copy, it does not make much sense. But at this point, I don't know if the change is really worth it.

ndyakov commented 6 years ago

@mariusbalcytis It shouldn't be a backwards incompatible change as long as people didn't move their config file. We upgraded the bundle and it was searching in config on older Symfony version, which doesn't make sense to me. I did miss the UPGRADE.MD file and now I see that it is addressed there. Anyway, if you don't think this is something to be fixed please close the issue.