neilime/zf2-assets-bundle

How can I prevent merge JS file

justinphan1992 opened this issue · 4 comments

Hi neilime.

Thank you to create nice tool to mannage the asset files. I have problem when turn on production mode the javascript file occurred error. Is there any way to turn off merge files just in javascript

There's no way to turn off mergin files for javascript at the moment. Maybe you can try to use an another javascript filter :

array(
    'assets_bundle' => array(
        'filters' => array(
            \AssetsBundle\AssetFile\AssetFile::ASSET_JS => 'JsMinAssetFileFilter',
        ),
    ),
);

Tell me if it works for you

Thank for your response

I tried but didnt work.

Or you can try to disable the JavaScript filter :

array(
    'assets_bundle' => array(
        'filters' => array(
            \AssetsBundle\AssetFile\AssetFile::ASSET_JS => new \Zend\Stdlib\ArrayUtils\MergeRemoveKey(),
        ),
    ),
);

Have you tried the previous solution ?