PHP code example of jacerider / neo_build
1. Go to this page and download the library: Download jacerider/neo_build 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/ */
jacerider / neo_build example snippets
$settings['neo'] = [
// By default (FALSE) the module will not check if neo dev server is running.
// Settings this to TRUE will automatically check if the server is running and
// serve neo assets fromm the server when appropriate.
// By default (FALSE) the module will not automatically check if neo dev
// server is running and if so, use it. Settings this to false will make sure that
// neo dev server will not be used, which is recommended setting for
// production environments.
'useDevServer' => TRUE,
// Global overrides.
/* Make note that these are global so they will take effect for all drupal
* asset libraries, so setting enabled => TRUE here is not really recommended.
* Probably the only useful to set here would be devServerUrl to globally
* override the default one.
*/
'enabled' => TRUE,
'manifest' => 'vue_app/dist/manifest.json',
'baseUrl' => '/some/custom/base/url/used/in/production/for/dist/assets/',
'devServerUrl' => 'http://localhost:5173',
'overrides' => [
// Per module/theme overrides.
'<module|theme>' => [
// ... settings like the global ones
]
// Per library overrides.>
'<module|theme>/<library>' => [
// ... settings like the global ones
]
],
]
location /neo-assets/ {
rewrite ^(.*)\.neo$ $1 break;
proxy_pass http://127.0.0.1:5173/neo-assets/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}