-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.config.js
267 lines (265 loc) · 9 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
const webpack = require('webpack')
const path = require('path')
module.exports = {
mode: 'development',
entry: path.resolve(__dirname, './webpack-entry'),
plugins: [
new webpack.ProvidePlugin({
riot: 'riot/riot.js',
$: 'jquery',
_: 'lodash',
key: 'keymaster',
shortid: 'shortid',
runtime: '@kaspersky/runtime/lib/instance',
BoolField: 'BoolField',
ButtonsListField: 'ButtonsListField',
KeyValueListField: 'KeyValueListField',
ValueListField: 'ValueListField',
SelectField: 'SelectField',
SelectPlatform: 'SelectPlatform',
SearchField: 'SearchField',
TextField: 'TextField',
TextAreaField: 'TextAreaField',
DependencyListField: 'DependencyListField',
DependantsField: 'DependantsField',
SimpleTextField: 'SimpleTextField',
UIRenderTypeField: 'UIRenderTypeField',
ValueField: 'ValueField',
LocaleValueField: 'LocaleValueField',
StyleField: 'StyleField',
TableColumnListField: 'TableColumnListField',
ListEditorActionsField: 'ListEditorActionsField',
ListEditorElementsField: 'ListEditorElementsField',
LinkButtonField: 'LinkButtonField',
DataSourceField: 'DataSourceField',
FormInitFunctionField: 'FormInitFunctionField',
OptionalFunctionField: 'OptionalFunctionField',
OptionalTextField: 'OptionalTextField',
LockSourceField: 'LockSourceField',
AccordionSourceField: 'AccordionSourceField',
ControlGroupElementsField: 'ControlGroupElementsField',
ValidationListField: 'ValidationListField',
InnerFormField: 'InnerFormField',
CheckboxField: 'CheckboxField',
ToggledRuntimeMemberSearchField: 'ToggledRuntimeMemberSearchField',
WizardStepsField: 'WizardStepsField',
CustomLayoutField: 'CustomLayoutField',
GridItemsListField: 'GridItemsListField',
Markdown: 'Markdown',
PropertyGroup: 'PropertyGroup',
ControlSetup: 'ControlSetup',
constants: 'constants',
server: 'server'
})
],
resolve: {
alias: {
constants: path.resolve(__dirname, 'src/client/modules/constants.js'),
BoolField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/bool-field.js'
),
ButtonsListField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/buttons-list-field.js'
),
TableColumnListField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/table-column-list-field.js'
),
ListEditorActionsField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/list-editor-actions-field.js'
),
ListEditorElementsField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/list-editor-elements-field.js'
),
KeyValueListField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/key-value-list-field.js'
),
SelectField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/select-field.js'
),
SelectPlatform: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/select-platform.js'
),
SearchField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/search-field.js'
),
TextField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/text-field.js'
),
TextAreaField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/textarea-field.js'
),
DependantsField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/dependants-field.js'
),
DependencyListField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/dependency-list-field.js'
),
SimpleTextField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/simple-text-field.js'
),
UIRenderTypeField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/ui-render-type-field.js'
),
ValueField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/value-field.js'
),
LocaleValueField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/locale-value-field.js'
),
StyleField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/style-field.js'
),
LinkButtonField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/link-button-field.js'
),
DataSourceField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/data-source-field.js'
),
FormInitFunctionField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/form-init-function-field.js'
),
OptionalFunctionField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/optional-function-field.js'
),
OptionalTextField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/optional-text-field.js'
),
ValidationListField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/validation-list-field.js'
),
LockSourceField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/lock-source-field'
),
AccordionSourceField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/accordion-source-field'
),
ControlGroupElementsField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/control-group-elements-field'
),
InnerFormField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/inner-form-field'
),
CheckboxField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/checkbox-field'
),
ToggledRuntimeMemberSearchField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/toggled-runtime-member-search-field'
),
WizardStepsField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/wizard-steps-field'
),
ValueListField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/value-list-field'
),
CustomLayoutField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/custom-layout-field'
),
GridItemsListField: path.resolve(
__dirname,
'src/client/modules/control-settings-fields/grid-items-list-field'
),
Markdown: path.resolve(__dirname, 'src/client/modules/property-sets/markdown-property-set'),
PropertyGroup: path.resolve(__dirname, 'src/client/modules/property-sets/property-group'),
ControlSetup: path.resolve(__dirname, 'src/client/modules/control-setup.js'),
server: path.resolve(__dirname, 'src/client/services/server.js'),
builder: path.resolve(__dirname, 'src/client/modules/control-settings-fields/builder.js'),
helpers: path.resolve(__dirname, 'src/client/modules/property-sets/helpers.js')
}
},
module: {
rules: [
{
test: /\.jsx?$/,
use: ['babel-loader'],
include: [path.resolve(__dirname)],
exclude: [path.resolve(__dirname, './node_modules')]
},
{
test: /\.(ts|tsx)$/,
use: ['ts-loader'],
include: [path.resolve(__dirname)],
exclude: [path.resolve(__dirname, './node_modules')]
},
{
test: /\.html$/,
use: ['html-loader'],
exclude: [path.resolve(__dirname, './node_modules')]
},
{
test: /\.md$/,
use: ['raw-loader']
},
{
test: /\.tag.js$/,
use: [path.resolve(__dirname, './riot-tag-loader')],
include: [
path.resolve(__dirname, './src/client/components'),
path.resolve(__dirname, './src/client/custom-settings'),
path.resolve(__dirname, './src/client/custom-modules')
]
},
{
test: /\.tag.html$/,
use: [path.resolve(__dirname, './riot-tag-loader')],
include: [
path.resolve(__dirname, './src/client/components'),
path.resolve(__dirname, './src/client/custom-settings'),
path.resolve(__dirname, './src/client/custom-modules')
]
},
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{
test: /\.(woff|eot|woff2|ttf)$/,
loader: 'file-loader',
options: {
name: '[folder]/[name].[ext]',
outputPath: '/css/fonts'
}
},
{
test: /\.svg$/,
loader: '@svgr/webpack'
}
]
},
output: {
path: path.resolve(__dirname, './lib/client/js'),
filename: 'client.js'
},
devServer: {
port: 2001
}
}