-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebpack.config.base.js
More file actions
71 lines (65 loc) · 1.61 KB
/
webpack.config.base.js
File metadata and controls
71 lines (65 loc) · 1.61 KB
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
import path from 'path'
import webpack from 'webpack';
export default {
externals: {
Client: '@ties-network/ties-client-base'
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: [{
loader: 'babel-loader',
options: {
cacheDirectory: true
}
}, {
loader: 'baggage-loader?[file].styl=styles'
}]
},
{
test: /\.[ot]tf$/,
use: {
loader: 'url-loader',
options: {
limit: 65000,
mimetype: 'application/octet-stream'
}
}
},
{
test: /\.svg$/,
loader: 'url-loader?limit=65000&name=public/images/[name].[ext]'
}
]
},
output: {
libraryTarget: 'commonjs2',
filename: 'renderer.dev.js',
path: path.join(__dirname, 'app')
},
plugins: [
new webpack.ProvidePlugin({
_: 'lodash',
classNames: 'classnames',
connect: ['react-redux', 'connect'],
moment: 'moment',
reduxForm: ['redux-form', 'reduxForm'],
withRouter: ['react-router-dom', 'withRouter'],
Client: 'Client',
Component: ['react', 'Component'],
PropTypes: 'prop-types',
React: 'react',
ReactDOM: 'react-dom',
Redirect: ['react-router-dom', 'Redirect'],
Route: ['react-router-dom', 'Route'],
Switch: ['react-router-dom', 'Switch']
}),
new webpack.NamedModulesPlugin(),
],
resolve: {
extensions: ['.js', '.json', '.jsx', '.scss'],
modules: ['node_modules', path.join(__dirname, 'src'), path.join(__dirname, 'static')]
}
}