-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.demo.js
More file actions
43 lines (35 loc) · 983 Bytes
/
Copy pathwebpack.config.demo.js
File metadata and controls
43 lines (35 loc) · 983 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
39
40
41
42
43
/**
* webpack 打包配置文件
* @author ilex
*/
var simpleConfig = require('amos-build/lib/simpleConfig');
// ------------------------------------------------------
// 添加webpack加载别名,用于导包重定向,优化打包以及代码
// 此处需要自己进行定义
// 👻可修改
// ------------------------------------------------------
var alias = {
'rayloading': __dirname + '/src/RayLoading.js'
};
var config = {
tpl: './example/tpl.html',
toFile: 'index.html',
port: 3001,
alias: alias,
sourceMap: true
};
var defaultConfig = simpleConfig(config);
defaultConfig.name = 'amos-init';
// ------------------------------------
// 入口点
// ------------------------------------
defaultConfig.entry = {
app: './example/Example.js'
};
// ------------------------------------
// 设置alias的另一种方式
// ------------------------------------
// if(alias){
// defaultConfig.resolve.alias = alias;
// }
module.exports = defaultConfig;