PHPackages                             ameotoko/contao-encore-bridge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ameotoko/contao-encore-bridge

ActiveContao-bundle

ameotoko/contao-encore-bridge
=============================

1.0.4(1y ago)1313↓87.5%LGPL-3.0-or-laterPHPPHP ^8.1

Since Jul 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ameotoko/contao-encore-bridge)[ Packagist](https://packagist.org/packages/ameotoko/contao-encore-bridge)[ RSS](/packages/ameotoko-contao-encore-bridge/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

Contao-Encore bridge
====================

[](#contao-encore-bridge)

This is an extension for [Contao CMS](https://contao.org) which provides a wrapper for [Webpack Encore bundle](https://github.com/symfony/webpack-encore-bundle)'s `encoreEntryLinkTags()` and `encoreEntryScriptTags()` functions, allowing a developer to use those functions in `.html5` templates as well.

Installation
------------

[](#installation)

*NOTE:* Webpack Encore Bundle requires `output_path` config to be set. If you do not yet have Webpack Encore Bundle installed, Contao-Encore Bridge will add it to your application automatically, so be sure to set `output_path` in your `config.yml` file before installation:

```
# config/config.yml
webpack_encore:
    output_path: '%kernel.project_dir%/public/build'
```

Then install Contao-Encore Bridge:

```
composer require ameotoko/contao-encore-bridge
```

Configuration
-------------

[](#configuration)

Configure your Webpack Encore as described in official docs:

- [setting up Webpack Encore](https://symfony.com/doc/current/frontend.html)
- [setting up Webpack Encore Bundle](https://github.com/symfony/webpack-encore-bundle)

Usage
-----

[](#usage)

Assuming you have configured your Webpack entrypoint like this:

```
// webpack.config.js
const Encore = require('@symfony/webpack-encore');

Encore
  .addEntry('app', './frontend/js/app.js')
;
```

you can now output all stylesheets and scripts for that entry in your `.html5` templates, e.g. in `fe_page.html5`:

```
DOCTYPE html>
