-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.skpm.config.js
83 lines (77 loc) · 2.22 KB
/
webpack.skpm.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
var ConcatPlugin = require('webpack-concat-plugin');
var CopyPlugin = require('copy-webpack-plugin');
module.exports = function (config) {
config.target = 'web';
config.resolve.alias = {
jquery: __dirname + '/src/assets/js/libs/jquery.min.js',
};
config.module.rules.push({
test: /\.(css)$/,
use: [
{
loader: 'style-loader',
},
{
loader: 'css-loader',
},
],
});
config.module.rules.push({
test: /\.tpl$/,
use: [
{
loader: 'dot-tpl-loader?append=true',
},
],
});
config.plugins.push(
new ConcatPlugin({
uglify: false,
sourceMap: false,
name: 'statics',
outputPath: '../Resources/',
injectType: 'none',
fileName: '[name].js',
filesToConcat: [
'jquery',
'./src/assets/js/libs/terrific-2.1.0.min.js',
'./src/assets/js/libs/velocity.min.js',
'./src/assets/js/libs/velocity.ui.min.js',
'./src/assets/js/libs/**',
'./src/assets/js/plugins/**',
'./src/assets/js/utils/**',
],
}),
new ConcatPlugin({
uglify: false,
sourceMap: false,
name: 'statics',
outputPath: '../Resources/css/',
injectType: 'none',
fileName: '[name].css',
filesToConcat: [
'./src/assets/css/reset.css',
'./src/assets/css/fronticons.css',
'./src/assets/css/unicons.css',
'./src/assets/patterns/**/css/*.css',
'./src/assets/patterns/**/css/variants/*.css',
],
})
);
config.plugins.push(
new CopyPlugin([
{
from: './src/assets/fonts',
to: '../Resources/fonts',
},
{
from: './src/assets/images',
to: '../Resources/images',
},
{
from: './src/frameworks',
to: '../Sketch/frameworks',
},
])
);
};