webpack-encore

Symfony Webpack Encore, Multiple JS/CSS Files to one file

半世苍凉 提交于 2021-02-08 13:13:41
问题 I want to create one css/js file from multiple css/js files. Multiple addEntry not working, please check my code and give me the solution. var Encore = require('@symfony/webpack-encore'); Encore // the project directory where compiled assets will be stored .setOutputPath('web/build/') // the public path used by the web server to access the previous directory .setPublicPath('/build') .cleanupOutputBeforeBuild() .enableSourceMaps(!Encore.isProduction()) // uncomment to create hashed filenames

Symfony Webpack Encore, Multiple JS/CSS Files to one file

有些话、适合烂在心里 提交于 2021-02-08 13:09:48
问题 I want to create one css/js file from multiple css/js files. Multiple addEntry not working, please check my code and give me the solution. var Encore = require('@symfony/webpack-encore'); Encore // the project directory where compiled assets will be stored .setOutputPath('web/build/') // the public path used by the web server to access the previous directory .setPublicPath('/build') .cleanupOutputBeforeBuild() .enableSourceMaps(!Encore.isProduction()) // uncomment to create hashed filenames

Symfony Webpack Encore, Multiple JS/CSS Files to one file

走远了吗. 提交于 2021-02-08 13:05:48
问题 I want to create one css/js file from multiple css/js files. Multiple addEntry not working, please check my code and give me the solution. var Encore = require('@symfony/webpack-encore'); Encore // the project directory where compiled assets will be stored .setOutputPath('web/build/') // the public path used by the web server to access the previous directory .setPublicPath('/build') .cleanupOutputBeforeBuild() .enableSourceMaps(!Encore.isProduction()) // uncomment to create hashed filenames

webpack: Cannot read property 'match' of undefined

本秂侑毒 提交于 2020-07-18 08:39:50
问题 I have installed webpack (Symfony encore) using npm as follows: sudo npm install -g @symfony/webpack-encore --save-dev I ran this from /var/www/project I was required to install globally due to issues with package managers and shared folders when dealing with Windows host / Linux guest. I cannot install webpack (node_modules) in the same directory (or under it) as the /var/www/project So my package.json file looks like this: { "name": "test", "version": "1.0.0", "description": "This is a test

How to add Fontawesome 5 to Symfony 4 using Webpack Encore

自闭症网瘾萝莉.ら 提交于 2020-03-17 06:44:05
问题 I want to add Font Awesome 5 to my Symfony 4 project, this is what I did : I added font awesome to my project using yarn : yarn add --dev @fortawesome/fontawesome-free I imported font awesome in my main scss file (assets/css/app.scss) : @import '~@fortawesome/fontawesome-free/scss/fontawesome'; my webpack encore configuration include my scss and js files : .addEntry('js/app', './assets/js/app.js') .addStyleEntry('css/app', './assets/css/app.scss') I compiled : ./node_modules/.bin/encore dev

Unknown “encore_entry_link_tags” function when using Webpack Encore ^0.21.0

狂风中的少年 提交于 2020-01-21 06:39:39
问题 I would like to use the new version of Webpack encore to have access to all the new features it offers. however after following the steps in the official guide I can't make it to work and I get Unknown "encore_entry_link_tags" function What I did: Update my php version to match requierement of Webpack encore bundle (>7.1.9) run composer require symfony/webpack-encore-bundle update the version of encore on the package.json 0.21.0 run npm install --save-dev clear cache I'm not sure why this is

Webpack Encore - jQuery plugins out of view

泪湿孤枕 提交于 2019-12-23 01:52:13
问题 I'm trying to use SensioLab Webpack Encore in my Symfony 3.3 project, but after adding few scripts to webpack, my script doesn't see functions of other scripts. package.json { "name": "HIDDEN", "version": "1.0.0", "license": "UNLICENSED", "description": "HIDDEN", "repository": { "url": "HIDDEN", "type": "git" }, "author": "Alexey Samara <HIDDEN>", "dependencies": { "jquery": "3.1.1", "expose-loader": "0.7.3", "bootstrap": "3.3.7", "datatables.net": "1.10.15", "datatables.net-buttons": "1.4.0"