https://github.com/zquintana/laravel-webpack
Integrate Webpack into Laravel
https://github.com/zquintana/laravel-webpack
laravel laravel-5-package laravel-package laravel5-package webpack webpack2
Last synced: 4 months ago
JSON representation
Integrate Webpack into Laravel
- Host: GitHub
- URL: https://github.com/zquintana/laravel-webpack
- Owner: zquintana
- License: mit
- Fork: true (mariusbalcytis/webpack-bundle)
- Created: 2017-06-06T00:01:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-15T17:32:49.000Z (almost 8 years ago)
- Last Synced: 2024-12-07T00:08:31.090Z (5 months ago)
- Topics: laravel, laravel-5-package, laravel-package, laravel5-package, webpack, webpack2
- Language: PHP
- Homepage:
- Size: 274 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Package to Integrate Webpack into Laravel
====Package to help integrating [webpack](https://webpack.js.org/) into Laravel project.
[Documentation](https://zquintana.github.io/laravel-webpack/)
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](https://github.com/sporto/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](https://webpack.js.org/configuration/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
-------- Thanks to [Marius Balčytis](https://github.com/mariusbalcytis) this package is a fork
of his Symfony [Webpack Bundle](https://github.com/mariusbalcytis/webpack-bundle).