-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
50 lines (47 loc) · 1.41 KB
/
webpack.config.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
const webpack = require('@nativescript/webpack');
const { resolve } = require('path');
module.exports = (env) => {
webpack.init(env);
webpack.chainWebpack(async (config) => {
const isPreview = !!env.preview;
if (!isPreview) {
const packages = [
{
package: "@nativescript-use/vue",
path: "../../packages/vue"
},
{
package: "@nativescript-use/nativescript-orientation",
path: "../../packages/nativescript-orientation"
},
{
package: "@nativescript-use/nativescript-keyboard",
path: "../../packages/nativescript-keyboard"
},
{
package: "@nativescript-use/nativescript-clipboard",
path: "../../packages/nativescript-clipboard"
},
{
package: "@nativescript-use/nativescript-media-query",
path: "../../packages/nativescript-media-query"
},
{
package: "@nativescript-use/nativescript-intersection-observer",
path: "../../packages/nativescript-intersection-observer"
},
{
package: "@nativescript-use/nativescript-task",
path: "../../packages/nativescript-task"
},
]
packages.forEach(package => (
config.resolve.alias.set(
package.package,
resolve(__dirname, package.path)
)
))
}
});
return webpack.resolveConfig();
};