-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.server.js
More file actions
34 lines (33 loc) · 867 Bytes
/
webpack.server.js
File metadata and controls
34 lines (33 loc) · 867 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
const webpack = require("webpack");
const path = require("path");
module.exports = {
target: "node",
cache: false,
context: __dirname,
devtool: "hidden-source-map",
entry: ["./src/server"],
output: {
path: path.join(__dirname, "dist"),
filename: "server.js"
},
plugins: [
new webpack.DefinePlugin({__CLIENT__: false, __SERVER__: true}),
new webpack.DefinePlugin({"global.GENTLY": false}),
new webpack.DefinePlugin({"process.env": {NODE_ENV: '"production"'}}),
new webpack.optimize.OccurenceOrderPlugin()
],
module: {
loaders: [
{include: /\.css$/, loaders: ["style", "css"]},
{include: /\.json?$/, loaders: ["json"]},
{include: /\.jsx?$/, loaders: ["babel-loader", "jsx?harmony"], exclude: /node_modules/}
]
},
resolve: {
extensions: ["", ".jsx", ".js"]
},
node: {
__dirname: true,
fs: 'empty'
}
};