Skip to content

Commit 8738bd1

Browse files
knagaitsevhiroppy
authored andcommitted
fix(examples): make examples webpack-dev-server npm script work on Windows (#2112)
* fix(examples): make dev server examples npm script work on windows * fix(package): remove cross env
1 parent 39807da commit 8738bd1

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

examples/run-example.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
const { spawn } = require('child_process');
4+
5+
const cwd = process.env.INIT_CWD;
6+
spawn('node', ['../../../bin/webpack-dev-server.js'], {
7+
cwd,
8+
stdio: 'inherit',
9+
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"build:client:live": "webpack ./client-src/live/index.js -o client/live.bundle.js --color --config client-src/live/webpack.config.js",
3232
"build:client:sockjs": "webpack ./client-src/sockjs/index.js -o client/sockjs.bundle.js --color --config client-src/sockjs/webpack.config.js",
3333
"build:client": "rimraf ./client/* && npm-run-all -s -l -p \"build:client:**\"",
34-
"webpack-dev-server": "cd $INIT_CWD && node ../../../bin/webpack-dev-server.js",
34+
"webpack-dev-server": "node examples/run-example.js",
3535
"release": "standard-version"
3636
},
3737
"dependencies": {

0 commit comments

Comments
 (0)