-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack-server-dev.config.js
More file actions
44 lines (36 loc) · 957 Bytes
/
webpack-server-dev.config.js
File metadata and controls
44 lines (36 loc) · 957 Bytes
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
var webpack = require('webpack');
var path = require('path');
module.exports = {
target: 'node',
cache: true,
context: __dirname,
debug: true,
devtools: "source-map",
entry: ["./src/server/server"],
output: {
path: path.join(__dirname, "public/server"),
filename: "server.js"
},
plugins: [
new webpack.DefinePlugin({__CLIENT__: false, __SERVER__: true}),
new webpack.DefinePlugin({"global.GENTLY": false})
],
module: {
loaders: [
{include: /\.json$/, loaders: ['json-loader']},
{include: /\.jsx$/, loaders: ['babel-loader?stage=1&optional=runtime']},
{include: /\.js$/, loaders: ['babel-loader?stage=1&optional=runtime'],
exclude: [/node_modules/, /bower_components/]}
]
},
resolve: {
extensions: ["", ".json", ".jsx", ".js"],
modulesDirectories: [
"src/server", "node_modules"
]
},
node: {
__dirname: true,
fs: 'empty'
}
}