Download the PHP package networkteam/neos-vite without Composer
On this page you can find all versions of the php package networkteam/neos-vite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download networkteam/neos-vite
More information about networkteam/neos-vite
Files in networkteam/neos-vite
Package neos-vite
Short Description Integrate Vite for asset bundling into Neos CMS
License
Informations about the package neos-vite
Networkteam.Neos.Vite
Installation
Go to your site package:
1. Install the package via composer
2. Install Vite via NPM (or Yarn, pnpm):
3. Create a vite.config.mjs
file in your site package:
4. You can now include Vite assets for development / production in your Fusion files:
This Fusion object will use a different include based on the FLOW_CONTEXT:
- Development: Loads entry from development server configured for the site (defaults to http://localhost:5173/)
- Production: Based on the generated manifest file it will include the hashed assets with CSS and recursive imports
By default the manifest is expected in Resources/Public/Dist
, but that can be changed by overriding Fusion properties:
Bonus: You can generate the URL to entries in the manifest
This will only return the URL to the file for an entry without considering imports.
Example for an SVG spritemap (using vite-plugin-svg-spritemap):
Multi-site
Configure individual Vite configurations for each site by adding a Vite setup with a corresponding vite.config.mjs
file in each site package.
Make sure to run each server on a different port by configuring the server.port
option in the Vite configuration.
Add Settings for each site in your Settings.yaml
:
Make sure to run multiple Vite servers for each site package.