- Symfony ships with a pure JavaScript library - called Webpack Encore - that makes it a joy to work with CSS and JavaScript.
- Webpack Encore is a simpler way to integrate Webpack into your application. It wraps Webpack, giving you a clean & powerful API for bundling JavaScript modules, pre-processing CSS & JS and compiling and minifying assets. Encore gives you a professional asset system that's a delight to use.
-
首先需要按照Node.js,可选安装Yarn
-
Installing Encore in Symfony Applications
composer require symfony/webpack-encore-bundle # 如果使用yarn yarn install # or npm install