forked from webiny/webiny-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webiny.project.ts
59 lines (56 loc) · 2.26 KB
/
webiny.project.ts
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
/* We don't need the following rule in this file, as it's not being bundled with Webpack. */
/* eslint-disable import/dynamic-import-chunkname */
export default {
name: "webiny-js",
cli: {
// No need to track anything when developing Webiny.
telemetry: false,
plugins: async () => {
/**
* In webiny-js repo, we need to handle cases when packages are not yet built.
* Imports of those packages will fail, and it is ok to continue with process execution.
*/
try {
const modules = await Promise.allSettled([
import("@webiny/cli-plugin-workspaces"),
import("@webiny/cli-plugin-deploy-pulumi"),
import("@webiny/cwp-template-aws/cli"),
import("@webiny/cli-plugin-scaffold"),
import("@webiny/cli-plugin-scaffold-graphql-service"),
import("@webiny/cli-plugin-scaffold-admin-app-module"),
import("@webiny/cli-plugin-scaffold-extensions"),
import("@webiny/cli-plugin-scaffold-workspaces"),
import("@webiny/cli-plugin-scaffold-ci")
]);
return modules
.map(m => {
// Use only "fulfilled" imports.
if (m.status === "fulfilled") {
try {
return typeof m.value.default === "function"
? m.value.default()
: m.value.default;
} catch {
// This one is most likely not built yet.
return null;
}
}
})
.filter(Boolean);
} catch (e) {
// If the whole promise fails, act as if there are no plugins.
return [];
}
}
},
appAliases: {
core: "apps/core",
api: "apps/api",
admin: "apps/admin",
website: "apps/website"
},
featureFlags: {
experimentalAdminOmniSearch: true,
newWatchCommand: true
}
};