webpack-bundle
webpack-bundle copied to clipboard
maba:webpack:compile --env=prod doesn´t work
Running the command
php bin/console maba:webpack:compile --env=prod
results in
[Symfony\Component\Console\Exception\CommandNotFoundException] There are no commands defined in the "maba:webpack" namespace.
Seems like maba:webpack:compile doesn´t accept any params
Did you register MabaWebpackBundle
inside AppKernel
? Maybe it's in dev
environment if block?
Yes, in fact the php bin/console maba:webpack:compile command, without the env param, works fine.
If it's working in dev
environment (which is default if you do not pass --env
) and not in prod
, I would suggest to:
- check if bundle is configured to be used in production environment (see
AppKernel
). It must be outside ofif (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
- clear
var/cache/prod
just to be sure that it's not cache-related somehow
In any way, I cannot see how this could be related to the bundle itself and not to the configuration of it in your current set-up.
Just had a similar problem after updating from a 0.5.x version. Even console cache:clear failed trying to access DynamicAssetProvider class, which presumably no longer exists. Manually removing var/cache/prod fixed it.