{"id":20961852,"url":"https://github.com/heimrichhannot/contao-encore-bundle","last_synced_at":"2026-03-17T18:05:39.313Z","repository":{"id":30727450,"uuid":"125825131","full_name":"heimrichhannot/contao-encore-bundle","owner":"heimrichhannot","description":"This bundle brings integration between Symfony encore and Contao CMS.","archived":false,"fork":false,"pushed_at":"2025-02-07T10:39:31.000Z","size":339,"stargazers_count":10,"open_issues_count":6,"forks_count":5,"subscribers_count":4,"default_branch":"v2","last_synced_at":"2026-03-04T16:42:57.443Z","etag":null,"topics":["contao","contao5","symfony-encore","webpack"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heimrichhannot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-19T08:26:40.000Z","updated_at":"2025-03-14T13:39:28.000Z","dependencies_parsed_at":"2023-10-28T19:28:15.260Z","dependency_job_id":"ea7c4c1a-2ec9-4293-969d-a2f7c3a44642","html_url":"https://github.com/heimrichhannot/contao-encore-bundle","commit_stats":{"total_commits":187,"total_committers":9,"mean_commits":20.77777777777778,"dds":0.2620320855614974,"last_synced_commit":"f56fbeb5b2502f0ca06e9db277e0097165940f0e"},"previous_names":[],"tags_count":80,"template":false,"template_full_name":null,"purl":"pkg:github/heimrichhannot/contao-encore-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-encore-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-encore-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-encore-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-encore-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heimrichhannot","download_url":"https://codeload.github.com/heimrichhannot/contao-encore-bundle/tar.gz/refs/heads/v2","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-encore-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30628405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contao","contao5","symfony-encore","webpack"],"created_at":"2024-11-19T02:17:56.559Z","updated_at":"2026-03-17T18:05:39.286Z","avatar_url":"https://github.com/heimrichhannot.png","language":"PHP","readme":"# Contao Encore Bundle\n[![Latest Stable Version](https://img.shields.io/packagist/v/heimrichhannot/contao-encore-bundle.svg)](https://packagist.org/packages/heimrichhannot/contao-encore-bundle)\n[![Total Downloads](https://img.shields.io/packagist/dt/heimrichhannot/contao-encore-bundle.svg)](https://packagist.org/packages/heimrichhannot/contao-encore-bundle)\n![CI](https://github.com/heimrichhannot/contao-encore-bundle/workflows/CI/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/heimrichhannot/contao-encore-bundle/badge.svg?branch=master)](https://coveralls.io/github/heimrichhannot/contao-encore-bundle?branch=master)\n![](https://img.shields.io/badge/PHPStan-level%204-brightgreen.svg?style=flat)\n\nUse the power and simplicity of symfony webpack encore in contao. This bundle let you decide on layout and page level, which encore entries should be loaded. If you want more, you can prepare your bundles define their own encore entries, so never need to manually add or remove encore entries again.\n\n## Features\n- use symfony encore ([symfony/webpack-encore](https://github.com/symfony/webpack-encore) and [symfony/webpack-encore-bundle](https://github.com/symfony/webpack-encore-bundle)) to enhance your contao assets workflow\n- conditionally load your assets only if necessary (entrypoints can be activated in the backend in layout and page setting or added from your bundle code (e.g. in a frontend module))\n- prepare your bundles to add encore entries when install them and strip assets from the contao global asset arrays\n\n\n## Setup\n\n\n### Prerequisites\n\n* Read the [Encore Documentation](https://symfony.com/doc/current/frontend.html) in order to install Encore and understand the core concepts of Webpack and Symfony Encore.\n\n### Prepare your project and bundle\n\nSetup your project for encore bundle: \n\n:arrow_right:\t[Project setup](docs/setup_project.md)\n\n:arrow_right:\t[Bundle setup](docs/setup_bundle.md)\n\n\n### Run Encore\n\n1. Run encore prepare command\n\n       php vendor/bin/contao-console huh:encore:prepare\n\n1. If (yarn) dependencies have changed, run yan install\n\n       yarn install\n\n1. Run encore to generate the assets\n\n       yarn encore dev\n\n1. Activate encore entries in the contao backend (if not added from code)\n\n## Usage\n\n### Activate encore entries\n\n1. In the contao backend, go to page layout configuration\n1. Check \"Activate Webpack Encore\" and fill the mandatory fields\n1. If you have a main project bundle entry containing the main stylesheets, add it as active entry, add also all other entries you want to have activated on every page. \n1. For page specific features, you can activate additional entries in page setting (site structure).\n    * Be aware, that child pages will inherit settings from their parants\n    * Pay attention that you check entries as active (if you want them to be loaded)!\n    * If you want an already added entry to be not loaded on an specific page, select it as entry and don't check \"active\".\n\n### Prepare command\n\n    php vendor/bin/contao-console huh:encore:prepare\n\nThe prepare command must be executed after every change to the encore entries configuration, e.g. after a composer update or changes to that configurations in your own code. \n\nThe command collect encore entries from all bundle and creates a file  called `encore.bundles.js` in your project root.\nThis file contains entries for all contao encore compatible bundles that are added by calling `encoreBundles.addEntries();` in your `webpack.config.js`.\n\nIt also collects the dependencies from the `package.json` files of bundles have EncoreExtensions registered and adds them to the project dependencies.\n\n```\nDescription:\n  Does the necessary preparation for contao encore bundle. Needs to be called after changes to bundle encore entries.\n\nUsage:\n  huh:encore:prepare [options]\n  encore:prepare\n\nOptions:\n      --skip-entries[=SKIP-ENTRIES]  Add a comma separated list of entries to skip their generation. [default: false]\n```\n\n### Run encore\n\nRun encore to generate/compile your assets. \n\n    yarn encore dev \n    yarn encore dev --watch \n    yarn encore prod\n\n## Documentation\n\n[Project setup](docs/setup_project.md) - Prepare your contao project for use with encore and encore bundle\n\n[Bundle setup](docs/setup_bundle.md) - Add encore bundle support to your bundle\n\n[Setup Javascript](docs/setup_javascript.md) - Help about setting up your encore entries\n\n[Developer Documentation](docs/developers.md)\n\n[Configuration Reference](docs/configuration.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-encore-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheimrichhannot%2Fcontao-encore-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-encore-bundle/lists"}