公告
财富商城
积分规则
提问
发文
2019-09-08 15:22发布
聊天终结者
I need to change which port webpack-dev-server listen to.
webpack-dev-server
Up to now, I've created these there files:
If you have not created a package.json file it will be good if you make one and have a code block like this:
{ "name": "someName", "description": "description", "main": "index.js", "scripts": { "start": "webpack-dev-server --host 0.0.0.0 --port 8080 --devtool eval --progress --colors", "build": "NODE_ENV=production webpack --config webpack.config.prod.js -p" }, "dependencies": { "babel-polyfill": "^6.16.0", "html-webpack-plugin": "^2.24.1", "react": "^15.3.2", "react-dom": "^15.3.2", "react-router": "^3.0.0", "redux": "^3.6.0" }, "devDependencies": { "babel-core": "^6.17.0", "babel-loader": "^6.2.5", "babel-preset-es2015": "^6.16.0", "babel-preset-react": "^6.16.0", "webpack": "^1.13.2", "webpack-dev-server": "^1.16.2" }, "babel": { "presets": [ "es2015", "react" ], "plugins": [ "transform-runtime", "transform-object-rest-spread" ] } }
You may remove the un used modules. Then run : npm start And it will run on port 8080
npm start
If you start your dev server without package.json. You may simply run following from terminal.
webpack-dev-server --host 0.0.0.0 --port 8080
最多设置5个标签!
If you have not created a package.json file it will be good if you make one and have a code block like this:
You may remove the un used modules. Then run :
npm start
And it will run on port 8080If you start your dev server without package.json. You may simply run following from terminal.