Skip to content

Commit eebb990

Browse files
Create webpack.config.js and add webpack to dependencies
- The webpack configuration will build the client-side bundle to `public` directory - Add webpack to dependencies to ensure it's installed (we shouldn't assume that it's installed globally)
1 parent 1d1f5e7 commit eebb990

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"babel-register": "^6.9.0",
2020
"express": "^4.13.4",
2121
"react": "^15.0.2",
22-
"react-dom": "^15.0.2"
22+
"react-dom": "^15.0.2",
23+
"webpack": "^1.13.1"
2324
},
2425
"devDependencies": {},
2526
"private": true,

webpack.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
entry: './client.js',
3+
output: {
4+
filename: 'bundle.js',
5+
path: 'public'
6+
},
7+
module: {
8+
loaders: [
9+
{
10+
test: /\.jsx$/,
11+
exclude: /node_modules/,
12+
loader: 'babel-loader',
13+
query: {
14+
presets: ['react']
15+
}
16+
}
17+
]
18+
}
19+
};

0 commit comments

Comments
 (0)