Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Symfony Finland:
Drop-dead simple SASS builds in Symfony Flex with Webpack Encore
Jul 10, 2017 @ 15:17:42

The Symfony Finland site has an article posted introducing you to Symfony Encore, a tool that makes it simpler to manage frontend libraries and dependencies via Webpack.

Symfony Encore is a wrapper for the JavaScript module bundler Webpack. Webpack is used to manage Front End assets like JavaScript, CSS and image for browser consumption, often with conversion step from a source format like SASS. Encore provides an opinionated way to add Webpack to your Symfony projects.

[...] Earlier this year I experimented with sharing a state object with Symfony and different front end tools. Recently I ported the Symfony 3 application to Symfony Flex. Now I will continue the evolution of the app by adopting Symfony Encore to the project.

The article briefly introduces Encore and what functionality it provides before getting to the installation (via yarn) and configuration that it installs by default. The post then goes through the setup of SASS, using assets in your pages and running builds.

tagged: symfony tutorial encore webpack assets build sass install configure

Link: https://symfony.fi/entry/drop-dead-simple-sass-builds-in-symfony-flex-with-encore-webpack


Trending Topics: