heggemsnes / parcel-twig
Get correct asset paths from Parcel when using Parcel Manifest.
Installs: 57
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0
This package is auto-updated.
Last update: 2025-05-08 16:40:01 UTC
README
Get correct asset paths from Parcel when using Parcel Manifest.
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require heggemsnes/parcel-twig
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for ParcelTwig.
ParcelTwig Overview
Simple plugin for extracting correct asset path from parcel-manifest.json when using parcel. Check out https://github.com/kult-byra/parcel-craft-docker for usecase.
Configuring ParcelTwig
You can change the path to the parcel-manifest.json file as well as to your dist folder in the settings.
Using ParcelTwig
Use the twig function {{asset("index.js")}} to generate a script tag linking to i.e. js.00a46daa.js bundle.
Brought to you by Sigurd Heggemsnes