-
Notifications
You must be signed in to change notification settings - Fork 863
/
webpack.frontend.mix.js
executable file
·39 lines (30 loc) · 1.37 KB
/
webpack.frontend.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
let mixFrontend = require('laravel-mix');
const fullPublicPath = "public/frontend";
/*
|--------------------------------------------------------------------------
| Mix Frontend Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mixFrontend.setPublicPath(fullPublicPath);
mixFrontend.js('resources/assets/frontend/js/libs.js', 'public/frontend/js')
.sass('resources/assets/frontend/sass/libs.scss', 'public/frontend/css');
mixFrontend.options({
processCssUrls: false,
purifyCss: false,
clearConsole: false
});
// copy non processing files to public path
mixFrontend.copyDirectory('resources/assets/frontend/libs/jquery.min.js', 'public/frontend/js/jquery.min.js');
mixFrontend.copyDirectory('resources/assets/frontend/img', 'public/frontend/img');
mixFrontend.copyDirectory('resources/assets/frontend/fonts', 'public/frontend/fonts');
mixFrontend.copyDirectory('resources/assets/frontend/flags', 'public/frontend/flags');
mixFrontend.copyDirectory('resources/assets/frontend/rs-plugin', 'public/frontend/rs-plugin');
if (mixFrontend.inProduction()) {
mixFrontend.version();
mixFrontend.sourceMaps();
}