-
Notifications
You must be signed in to change notification settings - Fork 30
/
webpack.mix.js
38 lines (34 loc) · 1.02 KB
/
webpack.mix.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* This file sets up the compilation of JS and SASS for the project using Laravel Mix. That is a
* framework built on top of Webpack, greatly simplifying doing the same thing in vanilla Webpack.
*
* Use `npm run dev` to compile once
* Use `npm run watch` to watch the files, compile, and refresh the proxy below
* Use `npm run production` to compile the files for production
*
* @link https://github.com/JeffreyWay/laravel-mix/tree/master/docs
*/
const mix = require('laravel-mix');
var LiveReloadPlugin = require('webpack-livereload-plugin');
// Setup asset compilation
mix.sass('assets/scss/style.scss', 'static/css/theme-piklist.css')
.options({
processCssUrls: false
});
// Refresh the browser at the following domain when files change
mix.browserSync({
proxy: 'http://localhost:1313/Piklist-Documentation/',
files: [
'**/*.php',
'style.css',
'dist/app.js',
],
open: false,
notify: false,
});
// Load the LiveReload plugin
mix.webpackConfig({
plugins: [
new LiveReloadPlugin()
]
});