Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowwzw committed Mar 26, 2017
1 parent 2936e72 commit 5e21d92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lite-dev-server",
"version": "1.5.32",
"version": "1.5.33",
"description": "This is http file server for develpment. This server supports livereload function and proxy function for your api server.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const liteDevServer = (
historyApiFallback = false,
reloadDelayOnClient = 100,
}) => {
const clientScript = fs.readFileSync(`${__dirname}/client.js`, 'utf8').replace('webSocketPort', webSocketPort).replace('reloadDelay', reloadDelayOnClient);
const clientScript = fs.readFileSync(`${__dirname}/client.js`, 'utf8').replace(/webSocketPort/g, webSocketPort).replace(/reloadDelay/g, reloadDelayOnClient);
const _transform = function(chunk, enc, cb){
if(autoInjectClientJS){
const newChunk = (chunk+"").replace(/(<head>)/, `$1 \n<script>${clientScript}</script>`);
Expand Down

0 comments on commit 5e21d92

Please sign in to comment.