oscarbarrett/craft-twig-webpack-extension

This package is abandoned and no longer maintained. No replacement package was suggested.

A plugin that provides https://github.com/fullpipe/twig-webpack-extension

1.0.3 2018-05-29 01:45 UTC

This package is auto-updated.

Last update: 2022-05-04 09:40:37 UTC


README

A plugin that provides https://github.com/fullpipe/twig-webpack-extension

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require OscarBarrett/craft-twig-webpack-extension
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Twig Webpack Extension.

Configuration

Create a file at craft/config/twig-webpack-extension.php.

If your assets and manifest are in the same directory, simply set outputDir:

return [
    'outputDir' => '<outputDir>'
];

Alternatively, you can set each parameter separately:

return [
    'manifestPath' => <outputDir>/manifest.json',
    'jsPath' => '<jsOutputDir>/',
    'cssPath' => '<cssOutputDir>/'
];

The plugin can also be configured from the CMS.

Usage

See https://github.com/fullpipe/twig-webpack-extension