-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkyt.config.js
More file actions
38 lines (32 loc) · 830 Bytes
/
kyt.config.js
File metadata and controls
38 lines (32 loc) · 830 Bytes
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
// Base kyt config.
// Edit these properties to make changes.
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
reactHotLoader: true,
debug: false,
modifyWebpackConfig: function(config, options) {
// CLIENT
if (options.type === 'client') {
config.plugins.push(new HtmlWebpackPlugin({
template: 'src/index.ejs',
favicon: 'src/favicon.png',
}));
config.plugins.push(
new webpack.LoaderOptionsPlugin({
options: {
postcss: [require('postcss-cssnext')],
context: '/',
},
})
);
}
// SERVER
else {
config.plugins.push(new webpack.DefinePlugin({
'KYT.OPTIONS': JSON.stringify(options),
}));
}
return config;
}
};