protected function configureWebpack(LoaderInterface $loader, ContainerBuilder $container, array $config, $withTwig): void
    {
        if ($config['enabled']) {
            $loader->load('webpack.xml');

            $container->setParameter('fxp_require_asset.webpack.adapter', $config['adapter']);
            $this->configureWebpackManifest($container, $config['manifest_adapter']);
            $this->configureWebpackAssets($container, $config['assets_adapter']);

            if ($withTwig) {
                $loader->load('twig_webpack.xml');
            }
        }
    }