-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
58 lines (51 loc) · 1.33 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
let mix = require('laravel-mix')
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your application.
|
*/
const SRC = 'resources'
const DIST = 'dist'
mix.disableSuccessNotifications()
mix.setPublicPath(DIST)
mix.setResourceRoot(`/${SRC}/`)
/**
* Process Javascript
*
* @link https://laravel.com/docs/master/mix#working-with-scripts
*/
mix.js(`${SRC}/js/filament.js`, 'js')
/**
* Process CSS via PostCSS
*
*
* @link https://laravel.com/docs/master/mix#postcss
*/
mix.postCss(`${SRC}/css/filament.css`, 'css').options({
processCssUrls: false,
})
/**
* Sourcemaps
*
* Provide extra debugging information to your browser's
* developer tools when using compiled assets.
*
* @link https://laravel.com/docs/master/mix#css-source-maps
*/
mix.sourceMaps()
if (mix.inProduction()) {
/**
* Versioning / Cache Busting
*
* After generating the versioned file, you won't know the exact file name.
* So, you should use Laravel's global mix function within your views
* to load the appropriately hashed asset.
*
* @link https://laravel.com/docs/master/mix#versioning-and-cache-busting
*/
mix.version()
}