-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
35 lines (29 loc) · 924 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
35
const mix = require( 'laravel-mix' );
const wpPot = require( 'wp-pot' );
mix
.setPublicPath( 'public' )
.sourceMaps( false )
// admin assets
.js( 'src/FacebookPixel/resources/js/admin/give-fbpt-admin.js', 'public/js/' )
.sass( 'src/FacebookPixel/resources/css/admin/give-fbpt-admin.scss', 'public/css' )
// public assets
.js( 'src/FacebookPixel/resources/js/frontend/give-fbpt.js', 'public/js/' )
.sass( 'src/FacebookPixel/resources/css/frontend/give-fbpt.scss', 'public/css' )
// images
.copy( 'src/FacebookPixel/resources/images/*.{jpg,jpeg,png,gif}', 'public/images' );
mix.webpackConfig( {
externals: {
$: 'jQuery',
jquery: 'jQuery',
},
} );
if ( mix.inProduction() ) {
wpPot( {
package: 'GIVE_FBPT',
domain: 'GIVE_FBPT',
destFile: 'languages/GIVE_FBPT.pot',
relativeTo: './',
bugReport: 'https://github.com/impress-org/give-fbpt/issues/new',
team: 'GiveWP <[email protected]>',
} );
}