1.3.0 • Published 5 months ago
@askphill/parcel-config-shopify v1.3.0
parcel-config-shopify
Parcel config for Shopify themes. We recommend using our CLI.
- Adds prefix to assets
- Serves development or production assets
- Cleans assets by prefix
- Excludes static assets (fonts and images)
To use assets in your theme, reference the generated prefix snippet (
snippets/asset-prefix.liquid
).
Configuration
Configure in package.json#shopify-parcel
.
Config | Default | Environment variable | Description | Scope |
---|---|---|---|---|
- | - | NODE_ENV | Mode (default build → production, watch → development). | namer |
prefix.development , prefix.production | ap-dev. , ap. | SHOPIFY_PARCEL_PREFIX | Prefix for assets in development and production. Use environment variable to override (skips snippets generation). | namer , reporter |
snippets | true | SHOPIFY_PARCEL_SNIPPETS | Generate snippets to serve development or production assets | reporter |
snippets.prefix | asset-prefix.liquid | SHOPIFY_PARCEL_PREFIX_SNIPPET | Filename for snippet with asset prefix | reporter |
snippets.dev | dev.liquid | SHOPIFY_PARCEL_DEV_SNIPPET | Filename for snippet to indicate development environment | reporter |
clean | true | SHOPIFY_PARCEL_CLEAN | Remove all [prefix]* files not included in bundle. | reporter |