PHPackages                             nsrosenqvist/phulp-webpack - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nsrosenqvist/phulp-webpack

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nsrosenqvist/phulp-webpack
==========================

The webpack addon for phulp

1.0.0(7y ago)017MITPHPPHP &gt;=5.6

Since Sep 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/nsrosenqvist/phulp-webpack)[ Packagist](https://packagist.org/packages/nsrosenqvist/phulp-webpack)[ RSS](/packages/nsrosenqvist-phulp-webpack/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Phulp Webpack
=============

[](#phulp-webpack)

It's a third-party project that provides a means to pipe files to [Webpack](https://github.com/webpack/webpack/).

There are some inconsistencies with how Webpack usually works since it requires actual files and entry points, so the plugin creates temporary files in the project directory to have paths resolve correctly. The main difference is that the config option `output.path` only works with relative paths rather than absolute paths since the output path is decided by what you pipe the files to with Phulp.

Installation
------------

[](#installation)

```
composer require nsrosenqvist/phulp-webpack
```

Usage
-----

[](#usage)

First argument accepts a config array that will be converted into JSON or a string with the path to config file. The second argument is an optional path to the Webpack executable in case it's not globally in your `$PATH`.

Regex must be wrapped with the class `Raw` in order for it to not be escaped when exporting the config to webpack.

```
