forked from istSOS/javascript-core
-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.production.config.js
executable file
·61 lines (61 loc) · 2.13 KB
/
webpack.production.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
59
60
61
const path = require('path');
const webpack = require('webpack');
const ClosureCompilerPlugin = require('webpack-closure-compiler');
module.exports = {
context: path.resolve(__dirname, './src'),
entry: {
app: './index.js'
},
output: {
path: path.resolve(__dirname, './dist'),
filename: 'istsos.min.js',
library: 'istsos',
libraryTarget: 'umd'
},
resolve: {
alias: {
ServerContainer: path.resolve(__dirname, 'src/ServerContainer.js'),
Date: path.resolve(__dirname, 'src/Date.js'),
Database: path.resolve(__dirname, 'src/Database.js'),
Configuration: path.resolve(__dirname, 'src/Configuration.js'),
Server: path.resolve(__dirname, 'src/Server.js'),
ObservedProperty: path.resolve(__dirname, 'src/ObservedProperty.js'),
ProcedureBase: path.resolve(__dirname, 'src/ProcedureBase.js'),
Service: path.resolve(__dirname, 'src/Service.js'),
EventTypes: path.resolve(__dirname, 'src/EventTypes.js'),
EventEmitter: path.resolve(__dirname, 'src/EventEmitter.js'),
Offering: path.resolve(__dirname, 'src/Offering.js'),
Procedure: path.resolve(__dirname, 'src/Procedure.js'),
VirtualProcedure: path.resolve(__dirname, 'src/VirtualProcedure.js'),
UnitOfMeasure: path.resolve(__dirname, 'src/UnitOfMeasure.js'),
DataQuality: path.resolve(__dirname, 'src/DataQuality.js'),
Output: path.resolve(__dirname, 'src/Output.js'),
HttpAPI: path.resolve(__dirname, 'src/HttpAPI.js'),
IstsosHelper: path.resolve(__dirname, 'src/IstsosHelper.js')
}
},
module: {
rules: [
{
test: /\.js$/,
exclude: [/node_modules/],
use: [{
loader: 'babel-loader',
options: {
presets: ['es2015']
},
}],
}
],
},
plugins: [
new ClosureCompilerPlugin({
compiler: {
language_in: 'ECMASCRIPT6',
language_out: 'ECMASCRIPT5',
compilation_level: 'SIMPLE'
},
concurrency: 3,
})
]
};