Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 712 Bytes

File metadata and controls

15 lines (12 loc) · 712 Bytes

Introduction(Managing CSS and JavaScript)

  • Symfony ships with a pure JavaScript library - called Webpack Encore - that makes it a joy to work with CSS and JavaScript.

Webpack Encore

  • 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.

Installing Encore

  • 首先需要按照Node.js,可选安装Yarn

  • Installing Encore in Symfony Applications

      composer require symfony/webpack-encore-bundle
      
      # 如果使用yarn
      yarn install
      
      # or
      npm install