forked from webosbrew/piccap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
38 lines (37 loc) · 895 Bytes
/
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
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
ui: path.resolve(__dirname, './frontend/js/ui.js'),
servicecalls: path.resolve(__dirname, './frontend/js/servicecalls.js'),
spatialnavigation: path.resolve(__dirname, './frontend/js/spatial-navigation.js'),
},
target: ['web', 'es5'],
mode: 'production',
devtool: false,
module: {
rules: [
{
test: /\.js$/,
// exclude: /node_modules/,
exclude: /core-js/,
use: ['babel-loader'],
},
],
},
resolve: {
extensions: ['.js'],
},
output: {
path: path.resolve(__dirname, './build/piccap-frontend/'),
filename: './[name].bundled.js',
},
performance: {
maxAssetSize: 1000000
},
plugins: [
new CopyPlugin({
patterns: [{ context: 'frontend', from: '**', to: '.' }],
}),
],
};