prosky/nette-webpack

Webpack Bridge for Nette Framework

0.9 2020-07-16 09:38 UTC

This package is auto-updated.

Last update: 2025-03-07 04:10:11 UTC


README

#Nette Webpack Assets

Installation

  1. In config.neon add extension Extension.php
extensions:
    assets: Prosky\NetteWebpack\Extension
  1. Configure assets. For Example

Local Development configuration

assets:
    publicPath: /output/dev
    devPort:  8099
    devServer:  true

Development configuration

assets:
    publicPath: /output/dev

Production configuration

assets:
    publicPath: /output/prod

Default configuration

assets:
    macro: asset
    debugMode: %debugMode%
    wwwDir: %wwwDir%
    publicPath: null
    devServer:  null
    manifest: manifest.json

Usage

<link type="text/css" href="{asset front.css}">
<script async src="{asset front.js}" type="application/javascript"></script>