-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace depreciated react-hot-loader
- Loading branch information
Daniel Levitt
committed
Oct 12, 2015
1 parent
f28baa5
commit d51c774
Showing
9 changed files
with
64 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"stage": 1, | ||
"env": { | ||
"development": { | ||
"plugins": ["react-transform"], | ||
"extra": { | ||
"react-transform": { | ||
"transforms": [{ | ||
"transform": "react-transform-hmr", | ||
"imports": ["react"], | ||
"locals": ["module"] | ||
}] | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
!.eslintrc | ||
!.jscsrc | ||
!.scss-lint.yml | ||
!.babelrc | ||
!.eslintignore | ||
|
||
# Logs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
import gulp from "gulp"; | ||
import gutil from "gulp-util"; | ||
import express from "express"; | ||
import path from "path"; | ||
import webpack from "webpack"; | ||
import WebpackDevServer from "webpack-dev-server"; | ||
import config from "../config/webpack-hot-server.config"; | ||
|
||
var port = process.env.PORT || 3000; | ||
var url = "http://localhost:" + port | ||
|
||
gulp.task("webpack:development", () => { | ||
new WebpackDevServer(webpack(config), config.devServer).listen(config.devServer.port, "localhost", function(err) { | ||
if (err) { | ||
throw new gutil.PluginError("webpack-dev-server", err); | ||
} | ||
gutil.log("[webpack-dev-server]", "http://localhost:" + config.devServer.port + "/index.html"); | ||
}); | ||
var app = express(); | ||
var compiler = webpack(config); | ||
|
||
express() | ||
.use(require("webpack-dev-middleware")(compiler, { | ||
noInfo: true, | ||
publicPath: config.output.publicPath | ||
})) | ||
.use(require("webpack-hot-middleware")(compiler)) | ||
.use(express.static(path.resolve(__dirname, "../../dist"))) | ||
.listen(port, () => gutil.log("Server started on " + gutil.colors.green(url))); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters