-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
89 lines (79 loc) · 3.08 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
82
83
84
85
86
87
88
89
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/
mix
.webpackConfig({
module: {
rules:[
{
test: /\.txt$/i,
use: ['raw-loader'],
},
{
test: /\.csv$/i,
loader: 'csv-loader',
options: {
dynamicTyping: true,
header: false,
skipEmptyLines: false,
},
},
{
test:/\.twig$/,
use:['twig-loader']
},
{
test: /\.(png|jpe?g|gif|svg|eot|ttf|woff|woff2)$/i,
type: "asset/inline"
}
]
},
resolve: {
fallback: {
"fs": false,
"path": false,
"crypto": false,
"stream": false,
}
}
})
.sourceMaps(true, 'inline-source-map')
// --------------------------------------
// fields: cssMarginPadding
.js('./src_broccoli/fields/cssMarginPadding/cssMarginPadding.js', './fields/cssMarginPadding/frontend/')
.sass('src_broccoli/fields/cssMarginPadding/cssMarginPadding.css.scss', './fields/cssMarginPadding/frontend/cssMarginPadding.css')
// --------------------------------------
// fields: image
.js('./src_broccoli/fields/image/image.js', './fields/image/frontend/')
.sass('src_broccoli/fields/image/image.css.scss', './fields/image/frontend/image.css')
// --------------------------------------
// fields: imageList
.js('./src_broccoli/fields/imageList/image-list.js', './fields/imageList/frontend/')
.sass('src_broccoli/fields/imageList/image-list.css.scss', './fields/imageList/frontend/image-list.css')
// --------------------------------------
// modules: basics/_
.js('./src_broccoli/modules/basics/basics/_/module.js', './broccoli_modules/basics/basics/_/module.js')
.sass('./src_broccoli/modules/basics/basics/_/module.css.scss', './broccoli_modules/basics/basics/_/module.css')
// --------------------------------------
// modules: interactives/image-slider
.js('./src_broccoli/modules/basics/interactives/image-slider/module.js', './broccoli_modules/basics/interactives/image-slider/module.js')
// --------------------------------------
// px2style
.js('./src_px2style/px2style.js', './dist/px2style.js')
.sass('./src_px2style/px2style.css.scss', './dist/px2style.css')
// px2style - Theme
.sass('./src_px2style/_src/themes/auto/auto.css.scss', './dist/themes/auto.css')
.copy('./dist/themes/auto.css', './src_px2/px-files/themes/auto/theme_files/styles/px2style-theme-auto.css')
.sass('./src_px2style/_src/themes/default/default.css.scss', './dist/themes/default.css')
.copy('./dist/themes/default.css', './src_px2/px-files/themes/default/theme_files/styles/px2style-theme-default.css')
.sass('./src_px2style/_src/themes/darkmode/darkmode.css.scss', './dist/themes/darkmode.css')
.copy('./dist/themes/darkmode.css', './src_px2/px-files/themes/darkmode/theme_files/styles/px2style-theme-darkmode.css')
;