Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4d52263

Browse files
committed
update webpack-dev-server
1 parent c04b70a commit 4d52263

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

‎tutorials/webpack-dev-server/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
THIS SERVER SHOULD BE USED FOR DEVELOPMENT ONLY!
2+
3+
DO NOT USE IT IN PRODUCTION!
4+
5+
It's a live reloading server for webpack.

‎tutorials/webpack-dev-server/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"webpack-dev-server": "^1.16.2"
2323
},
2424
"reference": [
25-
"https://webpack.github.io/docs/webpack-dev-server.html"
25+
"https://github.com/webpack/webpack-dev-server/tree/webpack-1",
26+
"https://webpack.github.io/docs/webpack-dev-server.html",
27+
"https://webpack.github.io/docs/hot-module-replacement.html"
2628
]
2729
}

‎tutorials/webpack-dev-server/webpack.config.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
var path = require("path");
2-
varHtmlWebpackPlugin=require('html-webpack-plugin');
2+
33
var webpack = require('webpack');
44

5+
var HtmlWebpackPlugin = require('html-webpack-plugin');
6+
57
module.exports = {
6-
entry: {
7-
main: "./src/index.js"
8-
},
8+
entry: path.join(__dirname, "./src/index.js"),
9+
910
output: {
1011
path: path.join(__dirname, "buildOutput"),
1112
filename: "bundle.js"
1213
},
14+
1315
module: {
1416
loaders: [{
1517
test: /\.js$/,
@@ -19,11 +21,13 @@ module.exports = {
1921
loader: 'style!css'
2022
}]
2123
},
24+
2225
plugins: [
2326
new HtmlWebpackPlugin()
2427
// new webpack.HotModuleReplacementPlugin()
2528
]
26-
// --content-base buildOutput --port=3344 --colors --inline --hot --open
29+
30+
//webpack-dev-server --content-base buildOutput --port=3344 --colors --inline --hot --open
2731
// devServer: {
2832
// contentBase: './buildOutput',
2933
// port: '3344',

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /