Category: webpack

How to set fix header for datatables library in symfony projevt with webpack

I use Symfony with webpack and faced with problem when add new packeg datatables. I read many post about problem exclude this library and only one way give me successful resul wihout error by import package.json { "devDependencies": { "@fortawesome/fontawesome-free":…

Webpack encore – DataTables styling Jquery [closed]

I’ve a problem with the rendering of my datatable made with Jquery dataTables.net. I don’t get icons asc,desc next to thead field.. js code: import ‘datatables.net-bs4/css/dataTables.bootstrap4.min.css’; import ‘datatables.net-bs4/js/dataTables.bootstrap4.min.js’; import ‘datatables.net-fixedheader-bs4/js/fixedHeader.bootstrap4.js’; import ‘datatables.net-fixedheader-bs4/css/fixedHeader.bootstrap4.min.css’; import ‘datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css’; import ‘datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js’; import ‘datatables.net-buttons/js/buttons.colVis.min.js’; import ‘datatables.net-buttons/js/buttons.flash.min.js’;…

Symfony/Webpack.encore configuration, add "modules rules" for using typescript with vue.js

I’m using Symfony 5 with webpack.encore and vue.js as front-end framework. I want to use typescript in vue. This basically works but I get an errer-msg when I try to import components, like this: homepage.ts import Vue1 from "vue"; import…

Symfony Webpack-Encore minify Js and CSS

I want minify all css and js of my project in symfony. in Symfony 3 I use Assetic for JS like this as simple: {% javascripts ‘@AppBundle/Resources/public/js/*’ ‘@AcmeBarBundle/Resources/public/js/form.js’ ‘@AcmeBarBundle/Resources/public/js/calendar.js’ %} <script src="{{ asset_url }}"></script> {% endjavascripts %} and for CSS…

Symfony/vue – how to passe data from controller to vue

I’m using Symfony 5 / twig with webpack.encore and vue.js. I passing datas (translation texts) to the used twig-template like this: Controller: class HomepageController extends AbstractController { const PAGE_ID = 2; // constants PageId /** * @Route("{_locale}/homepage", name="app_homepage") * */…

Symfony’s webpack include built files in template without any php in project

In project i am using Symfony’s Webpack Encore and i am following this instructions. Now i want include files from /public/build. So add links to index.html on final javascript and css files. But i want enableVersioning() too whitch means every…