-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathwebpack.config.js
58 lines (56 loc) · 1.57 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
51
52
53
54
55
56
57
58
// function DtsBundlePlugin() { }
// DtsBundlePlugin.prototype.apply = function (compiler) {
// compiler.plugin('done', function () {
// var dts = require('dts-bundle');
// dts.bundle({
// name: 'blip-sdk',
// main: __dirname + '/src/**/*.d.ts',
// out: __dirname + '/dist/types/blip-sdk.d.ts',
// removeSource: false,
// outputAsModuleFolder: true
// });
// });
// };
module.exports = {
context: __dirname + '/src',
entry: './BlipSdk.js',
externals: {
'lime-js': {
root: 'Lime',
commonjs2: 'lime-js',
commonjs: 'lime-js',
amd: 'Lime'
},
'lime-transport-websocket': {
root: 'WebSocketTransport',
commonjs2: 'lime-transport-websocket',
commonjs: 'lime-transport-websocket',
amd: 'WebSocketTransport'
},
'bluebird': {
root: 'Promise',
commonjs2: 'bluebird',
commonjs: 'bluebird',
amd: 'Promise'
}
},
output: {
path: __dirname + '/dist',
filename: 'blip-sdk.js',
library: 'BlipSdk',
libraryTarget: 'umd'
},
module: {
preLoaders: [
{ test: /(src|test)(.+)\.js$/, loader: 'eslint' }
],
loaders: [
{ test: /(src|test)(.+)\.js$/, exclude: /node_modules/, loader: 'babel' },
{ test: /\.json$/, loader: 'json' }
]
},
plugins: [
// new DtsBundlePlugin()
],
devtool: 'source-map'
};