PHP code example of bariscodefx / webpack-php
1. Go to this page and download the library: Download bariscodefx/webpack-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bariscodefx / webpack-php example snippets
ack = new \bariscodefx\WebpackPHP\WebpackPHP("testdir/");
var_dump($webpack->asset('index.*\.js'));
var_dump($webpack->asset('main\.bundle.*\.js'));
<!DOCTYPE html>
<html>
<head>
<title>Foobar</title>
<?= $webpack->asset('something\.bundle\.*\.js')
<!DOCTYPE html>
<html>
<head>
<title>Foobar</title>
<?= $webpack->asset('something\.bundle\.*\.css', 'style')