-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
executable file
·64 lines (52 loc) · 1.41 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
let mix = require('laravel-mix');
/*
* Sets the development path to assets. By default, this is the `/resources`
* folder in the theme.
*/
const devPath = 'assets';
mix.setPublicPath( 'dist' );
/*
* Set Laravel Mix options.
*
* @link https://laravel.com/docs/5.6/mix#postcss
* @link https://laravel.com/docs/5.6/mix#url-processing
*/
mix.options( {
postCss : [ require( 'postcss-preset-env' )() ],
processCssUrls : false
} );
/*
* Builds sources maps for assets.
*
* @link https://laravel.com/docs/5.6/mix#css-source-maps
*/
mix.sourceMaps();
/*
* Versioning and cache busting. Append a unique hash for production assets. If
* you only want versioned assets in production, do a conditional check for
* `mix.inProduction()`.
*
* @link https://laravel.com/docs/5.6/mix#versioning-and-cache-busting
*/
mix.version();
/*
* Compile JavaScript.
*
* @link https://laravel.com/docs/5.6/mix#working-with-scripts
*/
mix.js(`${devPath}/js/app.js`, 'js');
/*
* Compile CSS. Mix supports Sass, Less, Stylus, and plain CSS, and has functions
* for each of them.
*
* @link https://laravel.com/docs/5.6/mix#working-with-stylesheets
* @link https://laravel.com/docs/5.6/mix#sass
* @link https://github.com/sass/node-sass#options
*/
// Sass configuration.
let sassConfig = {
outputStyle : 'expanded',
indentType : 'tab',
indentWidth : 1
};
mix.sass( `${devPath}/sass/style.scss`, 'styles', sassConfig );