function setJsCompressor($compressor)
    {
        if (!isset($this->compressors[$compressor])) {
            throw new \InvalidArgumentException(sprintf('Undefined compressor "%s"', $compressor));
        }

        $js = $this->contentType('.js');

        if ($this->jsCompressor !== null) {
            $this->bundleProcessors->unregister($js, $this->compressors[$this->jsCompressor]);
        }

        $this->jsCompressor = $compressor;
        $this->bundleProcessors->register($js, $this->compressors[$compressor]);
    }