-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.server.js
More file actions
36 lines (35 loc) · 1.02 KB
/
Copy pathwebpack.server.js
File metadata and controls
36 lines (35 loc) · 1.02 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
const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
entry: './server.js',
target: 'node',
externals: [nodeExternals()],
output: {
path: path.resolve('server-build'),
filename: 'index.js'
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: [
/node_modules/,
/bower_components/,
/server-build/,
/webpack.config.js/
],
loader: 'babel-loader'
}
]
},
resolve: {
alias: {
component: path.resolve(__dirname, "./src/components"),
container: path.resolve(__dirname, "./src/containers"),
action: path.resolve(__dirname, "./src/actions"),
helper: path.resolve(__dirname, "./src/helpers"),
config: path.resolve(__dirname, "./config.json")
},
extensions: [".jsx", ".js", ".json"]
}
};