-
Notifications
You must be signed in to change notification settings - Fork 0
/
cooking.conf.js
64 lines (52 loc) · 1.4 KB
/
cooking.conf.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
/**
* =============================================================================
* Cooking Config
* =============================================================================
*
* @see http://elemefe.github.io/cooking/
*
* @author dondevi
* @create 2016-10-28
* @update 2017-05-23 dondevi
* 1.Update: code style
*/
const path = require("path");
const cooking = require("cooking");
cooking.set({
entry: {
index: "./src/index.js",
mock: "./src/modules/Mock/index.js",
// ajax: "./src/modules/Core/ajax.js",
// util: "./src/modules/Util/index.js",
},
template: "./src/index.html",
clean: true,
extends: ["autoprefixer", /*"karma"*/],
publicPath: "./",
assetsPath: "./",
extractCSS: true,
alias: {
"vendors": path.resolve(__dirname, "./vendors"),
"examples": path.resolve(__dirname, "./examples"),
"src": path.resolve(__dirname, "./src"),
"themes": path.resolve(__dirname, "./src/themes"),
"modules": path.resolve(__dirname, "./src/modules"),
"components": path.resolve(__dirname, "./src/components"),
},
devServer: {
port: 8000,
clean: false,
hostname: "0.0.0.0",
sourceMap: true,
publicPath: "/",
},
});
cooking.add("loader.html", {
test: /\.html$/,
loader: "html-loader",
query: {
interpolate: true,
attrs: ["img:src", "link:href", "script:src", "iframe:src"],
},
});
module.exports = cooking.resolve();