-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
webpack.mix.js
executable file
·53 lines (41 loc) · 1.17 KB
/
webpack.mix.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
let mix = require('laravel-mix');
function public_path($path) {
if ($path) {
return "./public/" + $path;
} else {
return "./public"
}
}
function resources_path($path) {
if ($path) {
return "./resources/" + $path;
} else {
return "./resources"
}
}
// app.js
mix.js(resources_path("js/app.js"), "js").version();
// install.js
mix.js(resources_path("js/install.js"), "js").version();
//admin
// login
mix.js(resources_path("js/admin/login.js"), "js/admin").version();
//EditFile
mix.js(resources_path("js/admin/EditFile.js"), "js/admin").version();
// error
mix.js(resources_path("js/admin/error.js"), "js/admin").version();
// component
mix.js(resources_path("js/admin/component.js"), "js/admin").version();
// setting
mix.js(resources_path("js/admin/setting.js"), "js/admin").version();
mix.js(resources_path("js/admin/index.js"), "js/admin").version();
// pay
mix.js(resources_path("js/admin/pay.js"), "js/admin").version();
try {
require("./plugins.mix")
} catch {
}
mix.css(resources_path("sass/app.css"), "css").version();
// 设置public目录
mix.setPublicPath(public_path());
mix.setResourceRoot(resources_path());