Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds MabaWebpackBundle #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mariusbalcytis
Copy link

No description provided.

@stephanvierkant
Copy link
Collaborator

Why would I use this bundle instead of Symfony Encore?

@mariusbalcytis
Copy link
Author

webpack-encore is just a wrapper for webpack inside JavaScript world. In other words, you could either use webpack manually, or use encore manually - the idea is quite the same, only the API of configuration is different.

What makes integration to Symfony easier is ability to use manifest file. It's provided by Symfony core and webpack plugin (not encore).

What this bundle adds is twig extension, which allows to automatically get all the entry points from your application. Either you're using plain webpack or encore, you have to collect your entry points manually and configure them separately in the config.

It also supports pointing entry point directly to image for it's optimisation and adding hash to the generated URL for cache busting.

In other words, it's more like AsseticBundle replacement (with webpack and it's goodies) while encore is easier configuration for webpack itself.

It's possible to use encore with this bundle, too, but the starting template is not prepared at this moment.

@jkufner
Copy link

jkufner commented Apr 17, 2018

This sounds more like a feature request to webpack-encore.

@mariusbalcytis
Copy link
Author

Encore does not have any php code - it's just JavaScript wrapper on top of webpack to make commonly used configuration faster and use more-symfony-like naming for it. So, pull request is not an option - it does not have and won't have direct integration with twig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants