-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
134 lines (119 loc) · 6.68 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
const webpack = require('webpack')
const dotenv = require('dotenv')
const path = require('path')
dotenv.config();
module.exports = {
mode: 'development',
devtool: 'source-map',
devServer: {
static: {
directory: path.join(__dirname, 'src/main/resources/templates'),
},
port: 9000
},
entry: {
index: path.resolve(__dirname, 'src/main/js/reactjs/application/index.jsx'),
app: path.resolve(__dirname, 'src/main/js/reactjs/application/app.jsx'),
login: path.resolve(__dirname, 'src/main/js/reactjs/application/login.jsx'),
},
output: {
path: path.resolve(__dirname,"src/main/resources/static/built"),
filename: '[name].bundle.js'
},
module: {
rules: [
{
test: /\.(jsx|js)$/,
include: path.resolve(__dirname, 'src/main/js/'),
exclude: /node_modules/,
use: [{
loader: 'babel-loader',
options: {
presets: [
'@babel/preset-env',
'@babel/preset-react',
]
}
}
]
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
},
{
test: /\.(png|svg|jpg|jpeg|gif)$/i,
type: 'asset/resource',
},
]
},
plugins: [
new webpack.DefinePlugin({
'process.env': JSON.stringify(process.env)
})
],
resolve: {
extensions: ['*', '.js', '.jsx'],
alias: {
//Generic Reusable Components
client: path.resolve(__dirname, 'src/main/js/api/client.js'),
follow: path.resolve(__dirname, 'src/main/js/api/follow.js'),
IFrame: path.resolve(__dirname, 'src/main/js/reactjs/application/components/IFrame.jsx'),
NoteDialog: path.resolve(__dirname, 'src/main/js/reactjs/application/components/note/NoteDialog.jsx'),
DisplayDate: path.resolve(__dirname, 'src/main/js/reactjs/application/components/date/DisplayDate.jsx'),
DisplayDateTime: path.resolve(__dirname, 'src/main/js/reactjs/application/components/date/DisplayDateTime.jsx'),
//App Main Components
Main: path.resolve(__dirname, 'src/main/js/reactjs/application/components/main/Main.jsx'),
Parent: path.resolve(__dirname, 'src/main/js/reactjs/application/components/main/Parent.jsx'),
MarketingBar: path.resolve(__dirname, 'src/main/js/reactjs/application/components/main/MarketingBar.jsx'),
NavigationBar: path.resolve(__dirname, 'src/main/js/reactjs/application/components/main/NavigationBar.jsx'),
FooterBar: path.resolve(__dirname, 'src/main/js/reactjs/application/components/main/FooterBar.jsx'),
uriListConverter: path.resolve(__dirname, 'src/main/js/api/uriListConverter.js'),
uriTemplateInterceptor: path.resolve(__dirname, 'src/main/js/api/uriTemplateInterceptor.js'),
applicaitonStyles: path.resolve(__dirname, 'src/main/resources/static/app.css'),
// END Generic Reusable Components
//Form Components
StartForm: path.resolve(__dirname, 'src/main/js/reactjs/application/components/form/StartForm.jsx'),
ConfirmationForm: path.resolve(__dirname, 'src/main/js/reactjs/application/components/form/ConfirmationForm.jsx'),
//Form Actions
SaveAction: path.resolve(__dirname, 'src/main/js/reactjs/application/components/form/action/Save.jsx'),
ConfirmAction: path.resolve(__dirname, 'src/main/js/reactjs/application/components/form/action/Confirm.jsx'),
SubmitAction: path.resolve(__dirname, 'src/main/js/reactjs/application/components/form/action/Submit.jsx'),
//Form Info
FormInfo: path.resolve(__dirname, 'src/main/js/reactjs/application/components/form/Info.jsx'),
FormViewer: path.resolve(__dirname, 'src/main/js/reactjs/application/components/form/FormViewer.jsx'),
//Filters Components
StatusBar: path.resolve(__dirname, 'src/main/js/reactjs/application/components/filter/StatusBar.jsx'),
FilterBar: path.resolve(__dirname, 'src/main/js/reactjs/application/components/filter/FilterBar.jsx'),
//Workflow Components
WorkflowMain: path.resolve(__dirname, 'src/main/js/reactjs/application/components/workflow/Main.jsx'),
WorkflowInfo: path.resolve(__dirname, 'src/main/js/reactjs/application/components/workflow/Info.jsx'),
WorkflowStartAction: path.resolve(__dirname, 'src/main/js/reactjs/application/components/workflow/action/Start.jsx'),
//Task Components
TaskParent: path.resolve(__dirname, 'src/main/js/reactjs/application/components/task/Parent.jsx'),
TaskMain: path.resolve(__dirname, 'src/main/js/reactjs/application/components/task/Main.jsx'),
TaskList: path.resolve(__dirname, 'src/main/js/reactjs/application/components/task/List.jsx'),
TaskLine: path.resolve(__dirname, 'src/main/js/reactjs/application/components/task/Line.jsx'),
TaskDetail: path.resolve(__dirname, 'src/main/js/reactjs/application/components/task/Detail.jsx'),
TaskInfo: path.resolve(__dirname, 'src/main/js/reactjs/application/components/task/Info.jsx'),
TaskFilterBar: path.resolve(__dirname, 'src/main/js/reactjs/application/components/task/FilterBar.jsx'),
TaskSearchForm: path.resolve(__dirname, 'src/main/js/reactjs/application/components/task/form/SearchForm.jsx'),
CamundaForm: path.resolve(__dirname, 'src/main/js/reactjs/application/components/task/form/CamundaForm.jsx'),
TaskActionApprove: path.resolve(__dirname, 'src/main/js/reactjs/application/components/task/action/Approve.jsx'),
//Use-case Components
UseCaseMain: path.resolve(__dirname, 'src/main/js/reactjs/application/usecase/adhoc/components/Main.jsx'),
DetailForm: path.resolve(__dirname, 'src/main/js/reactjs/application/usecase/adhoc/components/DetailForm.jsx'),
CaseInfo: path.resolve(__dirname, 'src/main/js/reactjs/application/usecase/case/components/Info.jsx'),
// UseCaseMain: path.resolve(__dirname, 'src/main/js/reactjs/application/usecase/campaign/components/Main.jsx'),
// DetailForm: path.resolve(__dirname, 'src/main/js/reactjs/application/usecase/campaign/components/DetailForm.jsx'),
// CaseInfo: path.resolve(__dirname, 'src/main/js/reactjs/application/usecase/campaign/components/Info.jsx'),
// FormInfo: path.resolve(__dirname, 'src/main/js/reactjs/application/usecase/campaign/components/FormInfo.jsx'),
UserInfo: path.resolve(__dirname, 'src/main/js/reactjs/application/components/user/Info.jsx'),
Login: path.resolve(__dirname, 'src/main/js/reactjs/application/components/auth/Login.jsx'),
// END Use Case Components
}
}
}