-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
41 lines (41 loc) · 1.2 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
const webpack = require('webpack');
module.exports = {
context: __dirname + '/src/main/javascript',
entry:{
'resource-macro-editor': './resource-macro-editor.js',
'relation-macro-editor': './relation-macro-editor.js',
'toc-macro-editor': './toc-macro-editor.js',
'sparql-macro-editor': './sparql-macro-editor.js',
'subject-byline': './subject-byline.js',
'type-byline': './type-byline.js',
'class-byline': './class-byline.js',
'taxonomy-admin-page': './taxonomy-admin-page.js',
'taxonomy-page': './taxonomy-page.js'
},
output: {
path: __dirname + '/target/classes/static/js',
filename: '[name].js'
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader']
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.less$/,
use: ['less-loader']
}
]
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser',
})
]
};