benmanu / recipe-mix
SilverStripe recipe for Laravel Mix
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Type:silverstripe-recipe
Requires
This package is auto-updated.
Last update: 2024-11-29 05:21:03 UTC
README
Recipe to add Laravel Mix build chain dependencies to a SilverStripe project. This includes:
.babelrc
: Babel config file.eslintrc.js
: eslint config filepackage.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.
Installation
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
or NPM:
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 webpack.mix.js
file.
The themes/mix/src/
directory contains all of the dev application files.
The 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.