ldc-cocotte/webpack.mix.js

39 lines
1.4 KiB
JavaScript
Raw Normal View History

2020-10-30 17:26:00 +01:00
const mix = require('laravel-mix');
/*
2022-09-28 18:03:12 +02:00
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
2020-10-30 17:26:00 +01:00
*/
2022-09-28 18:03:12 +02:00
mix.options({
2021-05-18 14:46:29 +02:00
postCss: [
require('postcss-discard-comments')({
removeAll: true
})
]
});
mix.js("resources/js/app.js", "public/b-o/js")
.vue({ version: 2 })
.sass("resources/sass/app.scss", "public/b-o/css")
.copy(
"node_modules/@fortawesome/fontawesome-free/webfonts",
"public/webfonts"
);
//add front theme mix
2022-09-28 18:03:12 +02:00
mix.js('resources/views/front/' + process.env.APP_THEME + '/js/app.js', 'public/' + process.env.APP_THEME + '/js')
.sass('resources/views/front/' + process.env.APP_THEME + '/sass/app.scss', 'public/' + process.env.APP_THEME + '/css')
2021-03-05 13:16:21 +01:00
.options({
processCssUrls: false
2021-05-18 14:46:29 +02:00
});
2022-09-28 18:03:12 +02:00
mix.copyDirectory('resources/views/front/' + process.env.APP_THEME + '/img', 'public/' + process.env.APP_THEME + '/img/')
.copyDirectory('resources/views/front/' + process.env.APP_THEME + '/fonts', 'public/' + process.env.APP_THEME + '/fonts/');