zquintana / laravel-webpack
Integrate Webpack into Laravel
1.0.1
2017-06-15 17:32 UTC
Requires
- php: ^5.3.2 || >=7.0 <7.2
- symfony/process: ^2.5|^3.0
This package is auto-updated.
Last update: 2024-12-13 06:45:59 UTC
README
Package to help integrating webpack into Laravel project.
What is webpack?
Module bundler and CommonJS / AMD dependency manager.
For me, it replaces both grunt/gulp and RequireJS.
What does this package do?
- Finds javascript entry points inside your blade templates.
- Runs webpack with assets-webpack-plugin.
- Saves generated file names, so that twig function returns correct URL to generated asset.
Additionally, for development environment:
- Runs webpack-dev-server, which serves and regenerates assets if they are changed.
- Watches twig templates for changes, updates entry points and restarts webpack-dev-server if webpack configuration changes.
More goodies:
- Lets you configure webpack config as you want, while still providing needed parameters from Laravel, like entry points, aliases, environment and additional parameters.
- Lets you define custom entry point providers if you don't use twig or include scripts in any other way.
- Works with images and css/less/sass files out-of-the-box, if needed.
- Supports both Webpack 2 (by default) and Webpack 1.
Credits
- Thanks to Marius BalĨytis this package is a fork of his Symfony Webpack Bundle.