forked from freenas/gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
50 lines (46 loc) · 1.08 KB
/
webpack.config.js
File metadata and controls
50 lines (46 loc) · 1.08 KB
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
var webpack = require('webpack'),
path = require('path');
var libraryName = 'freenas-repository',
plugins = [],
outputFile;
outputFile = libraryName + '.js';
var config = {
entry: {
client: __dirname + '/src/service/middleware-client.ts',
repository: __dirname + '/src/repository/index.ts'
},
devtool: 'source-map',
output: {
path: path.join(__dirname, '/bin'),
filename: '[name].js',
library: ['freenas', '[name]'],
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
rules: [
{
test: /\.ts$/,
enforce: 'pre',
use: [
'tslint-loader'
]
},
{
test: /\.ts$/,
use: [
'ts-loader'
]
}
]
},
resolve: {
modules: [
path.resolve('./src'),
'node_modules'
],
extensions: [ '.js', '.ts' ]
},
plugins: plugins
};
module.exports = config;