-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwebpack.mix.js
34 lines (29 loc) · 933 Bytes
/
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
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Template Assets
|--------------------------------------------------------------------------
|
| All public assets must be compiled to the /wordpress/assets/templates
| directory. Commands like mix.babel and mix.copyDirectory do not use
| the configured public path.
|
| Laravel Mix documentation can be found at https://laravel-mix.com/.
|
| Watch: `npm run watch`
| Production: `npm run prod`
|
*/
// Options
let pub = 'wordpress/assets/templates';
mix.setPublicPath(pub).options({ processCssUrls: false });
// Front-end
mix.js('resources/assets/js/theme.js', 'theme/js')
.sass('resources/assets/sass/theme.scss', 'theme/css');
// Admin
mix.js('resources/assets/js/admin.js', 'admin/js')
.sass('resources/assets/sass/admin.scss', 'admin/css');
// Version
if (mix.inProduction()) {
mix.version();
}