SilverStripe recipe for Laravel Mix
Open Issues: 0
This package is auto-updated.
Last update: 2023-03-01 00:28:33 UTC
Recipe to add Laravel Mix build chain dependencies to a SilverStripe project. This includes:
.babelrc: Babel config file
.eslintrc.js: eslint config file
package.json: Laravel Mix, Vue, Jest
Provides chunk loading of Vue components for optimised component loading (only loads a component when used), aswell as some polyfills etc.
Install the recipe with the following composer call
composer require-recipe benmanu/recipe-mix
Once the files have been added you can build the theme files using either, Yarn:
yarn install yarn run dev yarn run production
npm install npm run dev npm run production
By default a
themes/mix/ folder is included as a starter theme. You can either set this to be the project theme, and add your template files. Alternatively you can change the theme source by editing the
themeDir variable defined in the
themes/mix/src/ directory contains all of the dev application files.
themes/mix/dist/ directory contains the compiled files.
When loading the compiled files into your template the
manifest.js file must be the first one included.