-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.mix.js
More file actions
59 lines (46 loc) · 1.22 KB
/
webpack.mix.js
File metadata and controls
59 lines (46 loc) · 1.22 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
let mix = require('laravel-mix');
/**
* Settings and Options
*/
const sass_options = {
sassOptions: {
outputStyle: 'expanded'
},
}
let webpackConfigOptions = {};
mix.setPublicPath('public/css');
mix.options({
processCssUrls: false,
autoprefixer: {
// browsers are listed in package.json
cascade: false,
},
});
if (!mix.inProduction()) {
// Do non-inline source-maps
webpackConfigOptions.devtool = "source-map";
}
mix.webpackConfig(webpackConfigOptions);
/**
* Vendor-related tasks (copy vendor scripts into public folder, and etc.)
* that we don't usually need to do by default.
*
* `npm run copy`
*/
if (process.env.COPY_VENDOR === 'yes') {
mix.copy('node_modules/orgchart/dist/js/jquery.orgchart.js', 'public/js/jquery.orgchart.js')
.copy('node_modules/html2canvas/dist/html2canvas.min.js', 'public/js/html2canvas.min.js');
}
/**
* App-related tasks (compile css, scripts, and etc.)
*
* `npm run dev` or `npm run watch` or `npm run prod`
*/
else {
mix.sass('public/css/source/orgchart/orgchart.scss', 'public/css', sass_options)
.sass('public/css/source/personlist/personlist.scss', 'public/css', sass_options);
if (!mix.inProduction()) {
mix.sourceMaps();
}
mix.version();
}