-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
24 lines (20 loc) · 896 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
let mix = require( 'laravel-mix' );
require( '@tinypixelco/laravel-mix-wp-blocks' );
// Autloading jQuery to make it accessible to all the packages, because, you know, reasons
// You can comment this line if you don't need jQuery.
mix.autoload({
jquery: ['$', 'window.jQuery', 'jQuery'],
});
mix.setPublicPath( './assets/dist' );
// Compile assets.
mix.js( 'assets/src/scripts/app.js', 'assets/dist/js' )
.js( 'assets/src/scripts/admin.js', 'assets/dist/js' )
.js( 'assets/src/scripts/yptSearch.js', 'assets/dist/js' )
.block( 'assets/src/scripts/gutenberg.js', 'assets/dist/js' )
.sass( 'assets/src/sass/style.scss', 'assets/dist/css' )
.sass( 'assets/src/sass/admin.scss', 'assets/dist/css' )
.sass( 'assets/src/sass/gutenberg.scss', 'assets/dist/css' );
// Add source map and versioning to assets in production environment.
if ( mix.inProduction() ) {
mix.sourceMaps().version();
}