-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwebpack.config.js
98 lines (95 loc) · 2.11 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
/*
*
* K2HR3 Web Application
*
* Copyright 2017 Yahoo Japan Corporation.
*
* K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers
* common management information for the cloud.
* K2HR3 can dynamically manage information as "who", "what", "operate".
* These are stored as roles, resources, policies in K2hdkc, and the
* client system can dynamically read and modify these information.
*
* For the full copyright and license information, please view
* the license file that was distributed with this source code.
*
* AUTHOR: Takeshi Nakatani
* CREATE: Tue Aug 15 2017
* REVISION:
*
*/
const webpack = require('webpack');
const path = require('path');
module.exports = {
entry: {
bundle: path.join(__dirname, '/src/r3app.jsx')
},
output: {
path: path.join(__dirname, '/public/js'),
filename: 'bundle.js'
},
module: {
rules: [
{
loader: 'babel-loader',
exclude: /node_modules/,
test: /\.js[x]?$/,
options: {
babelrc: false,
cacheDirectory: true,
presets: [
'@babel/preset-react',
'@babel/preset-env'
],
plugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
['@babel/plugin-proposal-private-methods', { loose: true }],
['@babel/plugin-proposal-private-property-in-object', { loose: true }]
]
}
},
{
test: /\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
importLoaders: 1,
modules: {
localIdentName: '[path][name]-[local]-[hash:base64:5]'
}
}
}
]
},
{
test: /\.(png|jpg)$/,
use : [
'url-loader?limit=8192'
]
}
]
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
})
],
resolve: {
extensions: ['*', '.js', '.jsx', '.css']
},
performance: {
maxEntrypointSize: 1572864,
maxAssetSize: 1572864
}
};
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noexpandtab sw=4 ts=4 fdm=marker
* vim<600: noexpandtab sw=4 ts=4
*/