PHP code example of mimmi20 / laminasviewrenderer-vite-url
1. Go to this page and download the library: Download mimmi20/laminasviewrenderer-vite-url 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/ */
mimmi20 / laminasviewrenderer-vite-url example snippets
return [
// ...
'vite-url' => [
'public-dir' => 'public', // <-- relative to the project root
'build-dir' => 'dist', // <-- relative to the public directory
],
// ...
];
$this->headLink()->appendStylesheet($this->viteUrl()->file('public/css/styles.css'), 'screen', ['rel' => 'stylesheet']);
$this->headLink()->appendStylesheet($this->viteUrl()->file('public/scss/styles.scss'), 'screen', ['rel' => 'stylesheet']);