-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.client.js
39 lines (38 loc) · 918 Bytes
/
webpack.client.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
const extras = require('./internal/webpack/extras.js');
const path = require('path');
const plugins = require('./internal/webpack/plugins.js');
const loaders = require('./internal/webpack/loaders.js');
module.exports = env => {
const client = {
devtool: extras.devTools(env),
entry: {
main: extras.hotLoader(
path.resolve(__dirname, './client/client.tsx'),
env
)
},
externals: {
vertx: 'vertx'
},
module: loaders.clientLoaders(env),
name: 'client',
output: {
filename: 'js/[name]_[hash].js',
path: path.join(__dirname, 'dist'),
publicPath: extras.publicPath(env)
},
plugins: plugins.clientPlugins(env),
resolve: extras.resolve,
target: 'web'
};
if (env.production) {
client.entry.vendorC = [
'react',
'lodash',
'react-dom',
'rxjs',
'material-ui'
];
}
return client;
};