-
Notifications
You must be signed in to change notification settings - Fork 7
/
pages.js
85 lines (84 loc) · 3.45 KB
/
pages.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
const path = require("path");
//生成每页的配置项
module.exports = {
pages: [
{
page: "home",
entry: path.resolve(__dirname, "./page/home.js"), //指向入口文件
title: "这是页面1",
template: path.resolve(__dirname, "./public/index.html"), //指向模板文件
filename: "home.html",
minify: {
removeAttributeQuotes: false, //删除属性的双引号
collapseInlineTagWhitespace: true //折叠一行
},
chunks: ["home","common"], // 引入公共模块 ---在build/webpack.config.js下配置的公共模块--110行
hash: true //生成带有hash值
},
{
page: "login",
entry: path.resolve(__dirname, "./page/login.js"), //指向入口文件
title: "这是页面2",
template: path.resolve(__dirname, "./public/index.html"), //指向模板文件
filename: "login.html",
minify: {
removeAttributeQuotes: false, //删除属性的双引号
collapseInlineTagWhitespace: true //折叠一行
},
chunks: ["login"],
hash: true //生成带有hash值
},
{
page: "news",
entry: path.resolve(__dirname, "./page/news.js"), //指向入口文件
title: "演示加载其它框架",
template: path.resolve(__dirname, "./public/index.html"), //指向模板文件
filename: "news.html",
minify: {
removeAttributeQuotes: false, //删除属性的双引号
collapseInlineTagWhitespace: true //折叠一行
},
chunks: ["news","common"],
hash: true //生成带有hash值
},
{
page: "point",
entry: path.resolve(__dirname, "./page/point.js"), //指向入口文件
title: "演示引入组件及传值",
template: path.resolve(__dirname, "./public/index.html"), //指向模板文件
filename: "point.html",
minify: {
removeAttributeQuotes: false, //删除属性的双引号
collapseInlineTagWhitespace: true //折叠一行
},
chunks: ["point","common"],
hash: true //生成带有hash值
},
{
page: "ftrem",
entry: path.resolve(__dirname, "./page/ftrem.js"), //指向入口文件
title: "演示rem自适应",
template: path.resolve(__dirname, "./public/index.html"), //指向模板文件
filename: "ftrem.html",
minify: {
removeAttributeQuotes: false, //删除属性的双引号
collapseInlineTagWhitespace: true //折叠一行
},
chunks: ["ftrem","common"],
hash: true //生成带有hash值
},
{
page: "views",
entry: path.resolve(__dirname, "./page/views.js"), //指向入口文件
title: "演示vue-router",
template: path.resolve(__dirname, "./public/index.html"), //指向模板文件
filename: "views.html",
minify: {
removeAttributeQuotes: false, //删除属性的双引号
collapseInlineTagWhitespace: true //折叠一行
},
chunks: ["views","common"],
hash: true //生成带有hash值
}
]
};