188

Product support

Visit this product's website for support.

Categories

Adds support for Laravel Mix mix helper function inside of templates. No set-up required, just install the plugin and start using it. For more information about the mix() global function, see: https://laravel-mix.com/docs/4.0/versioning

{{ mix('/public/css/theme.css') }}

Support

Need help? Have an issue with the plugin? Please submit an issue on GitHub: https://github.com/ompmega/oc-mix-helper-plugin/issues

Mix Helper Plugin

Helper plugin for OctoberCMS themes using Laravel Mix. Adds custom mix() twig function for the generated mix-manifest.json file.

Setup

  • Install plugin or search for Ompmega.MixHelper
  • Enable plugin (if not automatically enabled already)
  • Run yarn dev for development or yarn prod for production
  • Set a custom base URL in config/app.php: 'mix_url' => env(MIX_ASSET_URL, null), (optional)

Theme structure

Below is the directory structure that the plugin uses to locate the mix-manifest.json file and the provided webpack.mix.js example uses two new directories inside of assets.

my-theme/
├── assets/
│   ├── public/                 == Public folder for generated assets
│   ├── resources/              == Resources folder for development
│   └── mix-manifest.json       == Manifest in assets directory
├── content/
├── layouts/
├── pages/
├── partials/
└── webpack.mix.js              == Webpack in theme directory

Documentation

Issues

Please report any questions or issues here.

License

MIT

1.0.4

Add support for using child themes.

Oct 26, 2021

1.0.3

Add support for custom base URLs.

Nov 23, 2020

1.0.2

Remove CMS::url conflict with Translate plugin

Sep 24, 2019

1.0.1

Initialize plugin.

Jan 31, 2019