const mix = require('laravel-mix');
require('laravel-mix-twig');
mix.setPublicPath('dist');
mix.browserSync({
server : {
baseDir : 'dist',
directory: true,
},
files : ['./dist'],
});
}
mix.sass('src/scss/main.scss', 'css');
mix.js('src/js/main.js', 'js')
.sourceMaps(true)
.extract();
mix.alias({
'@': path.join(__dirname, 'src'),
});
mix.twig({
root : './src/templates',
entries : [
'*.twig',
],
output : './',
});
{
"private": true,
"scripts": {
"dev": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "mix --production"
},
"devDependencies": {
"laravel-mix": "^6.0.43",
"laravel-mix-twig": "^2.0.1"
}
}