-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathwebpack.mix.js
36 lines (30 loc) · 914 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 WebpackRTLPlugin = require('webpack-rtl-plugin');
mix.setPublicPath('assets/dist')
.sass('assets/src/css/give-ga-settings.scss', 'css/give-ga-settings.css')
.js('assets/src/js/give-ga-settings.js', 'js/give-ga-settings.js')
.sourceMaps(false, 'source-map')
.copyDirectory('assets/src/img', 'assets/dist/img')
mix.options({
// Don't perform any css url rewriting by default
processCssUrls: false,
// Prevent LICENSE files from showing up in JS builds
terser: {
extractComments: (astNode, comment) => false,
terserOptions: {
format: {
comments: false,
},
},
},
});
if (mix.inProduction()) {
mix.webpackConfig({
plugins: [
new WebpackRTLPlugin({
suffix: '-rtl',
minify: true,
}),
],
});
}