-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathwebpack.mix.js
More file actions
31 lines (27 loc) · 792 Bytes
/
webpack.mix.js
File metadata and controls
31 lines (27 loc) · 792 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
let mix = require('laravel-mix');
require('laravel-mix-merge-manifest');
const modulePath = `${__dirname}/modules`;
const themePath = `${__dirname}/themes`;
mix.disableNotifications();
mix.version();
mix.options(
{
postCss: [
require('postcss-discard-comments')(
{
removeAll: true
}
)
],
terser: {
extractComments: false,
},
}
);
if (process.env.npm_config_theme) {
require(`${themePath}/${process.env.npm_config_theme}/assets/webpack.mix.js`);
} else if (process.env.npm_config_module) {
require(`${modulePath}/${process.env.npm_config_module}/assets/webpack.mix.js`);
} else {
require(`${__dirname}/vendor/juzaweb/core/assets/webpack.mix.js`);
}