Create a gist now

Instantly share code, notes, and snippets.

Embed
Advanced Laravel Mix setup for WordPlate - https://github.com/wordplate/wordplate
const mix = require('laravel-mix');
const resources = 'resources/assets';
const themePath = 'public/themes/wordplate';
const assetsPath = `${themePath}/assets`;
mix.setPublicPath(assetsPath);
mix.setResourceRoot('../');
mix.browserSync({
proxy: 'wordplate.dev',
files: [
`${themePath}/**/*.php`,
`${assetsPath}/**/*.js`,
`${assetsPath}/**/*.css`
]
});
mix.js(`${resources}/scripts/app.js`, `${assetsPath}/scripts`);
mix.sass(`${resources}/styles/app.scss`, `${assetsPath}/styles`, {
includePaths: ['node_modules']
});
mix.sass(`${resources}/styles/editor-style.scss`, `${assetsPath}/styles`, {
includePaths: ['node_modules']
});
mix.version();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment