forked from splunk/addonfactory-ucc-base-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
42 lines (41 loc) · 1.33 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
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const webpackMerge = require('webpack-merge');
const baseConfig = require('@splunk/webpack-configs/base.config').default;
const { LicenseWebpackPlugin } = require('license-webpack-plugin');
module.exports = webpackMerge(baseConfig, {
entry: {
entry_page: path.join(__dirname, 'src/main/webapp/pages/entry_page'),
},
output: {
path: path.join(__dirname, 'dist/package/appserver/static/js/build'),
filename: '[name].js',
chunkFilename: '[name].js',
},
module: {
rules: [
{
test: /\.(s*)css$/,
use: ['style-loader', 'css-loader'],
},
],
},
plugins: [
new LicenseWebpackPlugin(),
new CopyWebpackPlugin([
{
from: path.join(__dirname, 'src/main/resources/splunk'),
to: path.join(__dirname, 'dist/package'),
},
{
from: path.join(__dirname, 'src/main/webapp/schema/schema.json'),
to: path.join(__dirname, 'dist/schema'),
},
{
from: path.join(__dirname, 'THIRDPARTY'),
to: path.join(__dirname, 'dist'),
},
]),
],
devtool: 'inline-source-map',
});