-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackerConfig.js
32 lines (29 loc) · 1.14 KB
/
packerConfig.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
const path = require('path');
const {buildExternal, packer, webpack} = require('lerna-packer');
const apps = {
demo: {
root: path.resolve(__dirname, 'packages', 'demo'),
template: path.resolve(__dirname, 'packages', 'demo/public/index.html'),
publicPath: path.resolve(__dirname, 'packages', 'demo/public'),// dev-server
port: 3000,
main: path.resolve(__dirname, 'packages', 'demo/src/index.js'),
dist: path.resolve(__dirname, 'dist', 'demo'),
servedPath: '/',// todo: make package.json homepage dependent,
vendors: [],
plugins: [],
},
};
const packages = {
// the keys are the commonjs names that is applied to externals
// this is the same as `@babel/plugin-transform-modules-commonjs` applies
reactSimpleGestures: {
name: 'react-simple-gestures',
root: path.resolve(__dirname, 'packages', 'simple-gestures'),
entry: path.resolve(__dirname, 'packages', 'simple-gestures/src/'),
externals: {
react: buildExternal('react'),
'react-dom': buildExternal('react-dom'),
},
},
};
packer(apps, packages, __dirname);