-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
executable file
·81 lines (72 loc) · 2.21 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* eslint-disable import/no-extraneous-dependencies */
const path = require('path');
const mix = require('laravel-mix');
require('laravel-mix-svg-vue');
const tailwindCss = require('tailwindcss');
mix.extract();
if (mix.inProduction()) {
mix.version();
mix.options({
terser: {
terserOptions: {
compress: {
drop_console: true,
},
},
},
});
} else {
mix.webpackConfig({ devtool: 'inline-source-map' }).sourceMaps();
}
mix.webpackConfig({
resolve: {
alias: {
Components: path.resolve(__dirname, './resources/assets/js/components/'),
Composable: path.resolve(__dirname, './resources/assets/js/composable/'),
Organisation: path.resolve(
__dirname,
'./resources/assets/js/views/organisation'
),
Activity: path.resolve(
__dirname,
'./resources/assets/js/views/activity/'
),
Interfaces: path.resolve(__dirname, './resources/assets/js/interfaces/'),
Store: path.resolve(__dirname, './resources/assets/js/store/'),
},
},
});
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.ts('resources/assets/js/app.ts', 'public/js').vue().version();
mix.ts('resources/assets/js/scripts/script.ts', 'public/js').version();
mix
.ts('resources/assets/js/scripts/webportal-script.ts', 'public/js')
.version();
mix.ts('resources/assets/js/scripts/formbuilder.ts', 'public/js').version();
mix
.sass('resources/assets/sass/app.scss', 'public/css')
.sass('resources/assets/sass/webportal-app.scss', 'public/css')
.options({
processCssUrls: false,
postCss: [tailwindCss('tailwind.config.js')],
})
.svgVue({
svgPath: 'resources/assets/images/svg',
svgoSettings: [
{ removeTitle: true },
{ removeViewBox: false },
{ removeDimensions: true },
{ prefixIds: true },
],
})
.version();
mix.options({ runtimeChunkPath: '.' });