代码之家  ›  专栏  ›  技术社区  ›  user172902

更新webpack-dev-server-laravel

  •  1
  • user172902  · 技术社区  · 6 年前

    我用的是React的laravel,我遇到了一些安全问题。根据 This post . 我需要升级我的webpack dev服务器。当前的my package.json文件看起来像

    {
    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
    },
    "devDependencies": {
        "axios": "^0.18",
        "babel-preset-react": "^6.23.0",
        "bootstrap": "^4.0.0",
        "cross-env": "^5.1",
        "jquery": "^3.2",
        "laravel-mix": "^2.0",
        "lodash": "^4.17.11",
        "popper.js": "^1.12",
        "react": "^16.2.0",
        "react-dom": "^16.2.0"
    },
    "dependencies": {
        "@material-ui/core": "^3.3.2",
        "@material-ui/icons": "^3.0.1",
        "classnames": "^2.2.6",
        "gulp": "^4.0.0",
        "moment": "^2.22.2",
        "react-datetime": "^2.16.2",
        "react-google-maps": "^9.4.5",
        "react-loading": "^2.0.3",
        "react-modal": "^3.6.1",
        "react-places-autocomplete": "^7.2.0",
        "react-redux": "^5.0.7",
        "react-router-dom": "^4.3.1",
        "recompose": "^0.30.0",
        "redux": "^4.0.1",
        "redux-logger": "^3.0.6",
        "redux-thunk": "^2.3.0",
        "reselect": "^4.0.0",
        "throttle-debounce": "^2.0.1",
        "underscore": "^1.9.1",
        "validator": "^10.8.0"
    }
    

    }

    我的package-lock.json文件提到了我的webpack dev服务器版本

    “版本”:“2.11.3”

    将我的网页包升级到不易受攻击的版本的正确过程是什么?

    0 回复  |  直到 6 年前