-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathwebpack.mix.js
58 lines (49 loc) · 1.97 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const mix = require('laravel-mix');
const { VuetifyLoaderPlugin } = require('vuetify-loader');
/*
|---------------------------------------------------------------------
| Inject Vuetify variables in SASS
|---------------------------------------------------------------------
*/
Mix.listen('configReady', (config) => {
const scssRule = config.module.rules.find((r) => r.test.toString() === /\.scss$/.toString());
scssRule.oneOf.forEach((ruleset) => {
const scssOptions = ruleset.use.find((l) => l.loader === 'sass-loader').options;
scssOptions.additionalData = '@import \'./resources/sass/vuetify/variables\';';
});
const sassRule = config.module.rules.find((r) => r.test.toString() === /\.sass$/.toString());
sassRule.oneOf.forEach((ruleset) => {
const sassOptions = ruleset.use.find((l) => l.loader === 'sass-loader').options;
sassOptions.additionalData = '@import \'./resources/sass/vuetify/variables\'';
});
});
/*
|---------------------------------------------------------------------
| Load the Vuetify Loader Plugin
|---------------------------------------------------------------------
*/
mix.extend('vuetify', new class {
webpackConfig(config) {
config.plugins.push(new VuetifyLoaderPlugin());
}
});
mix.vuetify();
/*
|---------------------------------------------------------------------
| Build and copy Vue application assets to 'public/dist' folder
|---------------------------------------------------------------------
*/
mix.js('resources/js/app.js', 'public/dist/js')
.js('resources/js/trading.js', 'public/dist/js')
.js('resources/js/overview.js', 'public/dist/js')
.js('resources/js/main.js', 'public/dist/js')
.js('resources/js/auth.js', 'public/dist/js')
.js('resources/js/plugins/hero-canvas.js', 'public/dist/js').vue()
.sass('resources/sass/app.scss', 'public/dist/css')
.sass('resources/sass/highcharts.scss', 'public/dist/css')
.copyDirectory('resources/js/assets/images', 'public/images');
if (mix.inProduction()) {
mix.version();
} else {
mix.sourceMaps();
}