zquintana / laravel-webpack by zquintana
forked from mariusbalcytis/webpack-bundle

Integrate Webpack into Laravel
136
0
2
Package Data
Maintainer Username: zquintana
Maintainer Contact: zach.quintana@gmail.com (Zachary Quintana)
Package Create Date: 2017-06-06
Package Last Update: 2017-06-15
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-22 03:10:48
Package Statistics
Total Downloads: 136
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Package to Integrate Webpack into Laravel

Package to help integrating webpack into Laravel project.

Documentation

What is webpack?

Module bundler and CommonJS / AMD dependency manager.

For me, it replaces both grunt/gulp and RequireJS.

What does this package do?

  1. Finds javascript entry points inside your blade templates.
  2. Runs webpack with assets-webpack-plugin.
  3. Saves generated file names, so that twig function returns correct URL to generated asset.

Additionally, for development environment:

  1. Runs webpack-dev-server, which serves and regenerates assets if they are changed.
  2. Watches twig templates for changes, updates entry points and restarts webpack-dev-server if webpack configuration changes.

More goodies:

  1. Lets you configure webpack config as you want, while still providing needed parameters from Laravel, like entry points, aliases, environment and additional parameters.
  2. Lets you define custom entry point providers if you don't use twig or include scripts in any other way.
  3. Works with images and css/less/sass files out-of-the-box, if needed.
  4. Supports both Webpack 2 (by default) and Webpack 1.

Credits