-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathwebpack.mix.js
More file actions
33 lines (26 loc) · 828 Bytes
/
webpack.mix.js
File metadata and controls
33 lines (26 loc) · 828 Bytes
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
const mix = require( 'laravel-mix' );
mix.setPublicPath( './assets' );
const sassConfig = {
processCssUrls: false,
};
// Custom webpack configuration.
mix.webpackConfig( {
// Externals - Load React and ReactDOM so we can use react dependent npm packages.
externals: {
react: 'React',
'react-dom': 'ReactDOM',
jquery: 'jQuery',
},
} );
// Javascript - Compile JS
mix.js( './src/javascript/custom-cookie-message-popup.js', '/js' );
mix.js( './src/javascript/custom-cookie-message-backend.js', '/js' );
mix.js( './src/javascript/ccm-suggest.js', '/js' );
// Sass - Compile CSS
mix.sass( './src/sass/style.scss', '/css/custom-cookie-message-popup.css' ).options( sassConfig );
// Always sourcemaps!
mix.sourceMaps();
// Disable notification in production.
if ( mix.inProduction() ) {
mix.disableNotifications();
}