-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault-config.js
97 lines (96 loc) · 1.9 KB
/
default-config.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
90
91
92
93
94
95
96
97
const UglifyJsPlugin = require( 'uglifyjs-webpack-plugin' );
module.exports = {
files: {
'your-file': {
dist: '', // Relative Path To Save The File.
src: '', // Relative Path To Get The File.
watch: [ 'file', 'file2', 'file3' ],
webpack: false,
scss: false,
uglify: false,
minify: false,
babel: false,
combine_files: false,
concat: false,
rename: false,
autoprefixer: false
},
'your-file-2': [
{
// Below Config Used To Create Minifed File.
dist: 'assets/css',
scss: true,
uglify: true,
concat: 'style.min.css',
},
{
// Below Config Used To Create Unminifed File
dist: 'assets/css',
scss: true,
uglify: false,
concat: 'style.css',
}
]
},
config: {
concat: { newLine: ';' },
uglify: true,
babel: {
presets: [ '@babel/env' ],
},
webpack: {
mode: 'production',
output: {
filename: '[name].js',
},
target: 'node',
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env' ]
}
}
]
},
},
webpack_dev: {
devtool: 'source-map',
mode: 'development',
plugins: [ new UglifyJsPlugin() ],
target: 'node',
externals: {
jquery: 'jQuery'
},
output: {
filename: '[name].js',
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env' ]
}
}
]
},
},
combine_files: {
append: 'gulp-append',
prepend: 'gulp-prepend',
inline: 'gulp-inline',
},
scss: {
outputStyle: 'expanded'
},
autoprefixer: {
overrideBrowserslist: [ 'last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4' ],
cascade: false
},
minify: { options: {}, callback: {} },
},
};