rewired-app-rewired компилирует не все файлы в режиме разработки - PullRequest
1 голос
/ 16 марта 2020

Я запускаю режим разработки «Resact-App-Rewired Start». Проект компилируется без ошибок.

Далее я редактирую любой файл в /src/*, проект перекомпилируется, но не отвечает на /src/view/* НЕТ компиляции!

Хотя, если я убью и перезапущу Демон "Response-App-Rewired Start" проект будет скомпилирован полностью. Почему это происходит?

пакет. json

{
  "name": "vuexy-react-admin-dashboard",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@auth0/auth0-spa-js": "^1.6.3",
    "@firebase/app": "^0.5.2",
    "@firebase/database": "^0.5.19",
    "ag-grid-community": "^22.1.1",
    "ag-grid-react": "^22.1.1",
    "apexcharts": "^3.15.3",
    "auth0-js": "^9.12.2",
    "availity-reactstrap-validation": "^2.6.1",
    "axios": "^0.19.2",
    "axios-mock-adapter": "~1.17.0",
    "babel-plugin-react-intl": "^5.1.18",
    "bootstrap": "^4.4.1",
    "chart.js": "^2.9.3",
    "chroma-js": "~2.1.0",
    "classnames": "~2.2.6",
    "draft-js": "^0.11.4",
    "file-saver": "^2.0.2",
    "firebase": "7.8.1",
    "flatpickr": "^4.6.3",
    "formik": "^2.1.3",
    "history": "^4.10.1",
    "intl-messageformat": "^7.8.4",
    "jquery": "~3.4.1",
    "jsonwebtoken": "~8.5.1",
    "leaflet": "^1.6.0",
    "match-sorter": "~4.0.2",
    "moment": "~2.24.0",
    "namor": "^2.0.2",
    "postcss-rtl": "^1.5.0",
    "prismjs": "^1.19.0",
    "prop-types": "~15.7.2",
    "query-string": "^6.10.1",
    "rc-slider": "^9.1.0",
    "react": "^16.12.0",
    "react-apexcharts": "^1.3.6",
    "react-beautiful-dnd": "^12.2.0",
    "react-big-calendar": "^0.24.0",
    "react-bootstrap-sweetalert": "^5.1.9",
    "react-chartjs": "^1.2.0",
    "react-chartjs-2": "^2.9.0",
    "react-contexify": "~4.1.1",
    "react-copy-to-clipboard": "~5.0.2",
    "react-countdown-now": "~2.1.2",
    "react-country-flag": "^2.0.1",
    "react-data-table-component": "^6.2.3",
    "react-dom": "^16.12.0",
    "react-draft-wysiwyg": "^1.14.4",
    "react-dropzone": "^10.2.1",
    "react-feather": "~2.0.3",
    "react-flatpickr": "^3.9.1",
    "react-hammerjs": "^1.0.1",
    "react-id-swiper": "~2.4.0",
    "react-input-mask": "~2.0.4",
    "react-intl": "^3.11.0",
    "react-joyride": "^2.2.1",
    "react-leaflet": "^2.6.1",
    "react-numeric-input": "~2.2.3",
    "react-paginate": "~6.3.2",
    "react-perfect-scrollbar": "^1.5.5",
    "react-redux": "~7.1.3",
    "react-ripples": "^2.2.1",
    "react-router-dom": "~5.1.2",
    "react-scripts": "^3.3.0",
    "react-scroll-up": "~1.3.3",
    "react-select": "~3.0.8",
    "react-sidebar": "~3.0.2",
    "react-table": "~6.10.0",
    "react-toastify": "^5.5.0",
    "react-toggle": "~4.1.1",
    "react-treebeard": "~3.2.3",
    "reactstrap": "^8.4.1",
    "recharts": "~1.8.5",
    "redux": "^4.0.5",
    "redux-debounced": "~0.5.0",
    "redux-thunk": "~2.3.0",
    "styled-components": "^5.0.1",
    "swiper": "^5.3.0",
    "xlsx": "^0.15.5",
    "yarn": "^1.21.1",
    "yup": "^0.28.1"
  },
  "scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test",
    "eject": "react-app-rewired eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "devDependencies": {
    "node-sass": "^4.13.1",
    "react-app-rewire-postcss": "^3.0.2",
    "react-app-rewired": "^2.1.5"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "homepage": ""
}

Редактировать:

Ниже содержимое файлов моих переопределений:

  • / config-overrides. js

    module.exports = config => {
      require('react-app-rewire-postcss')(config, {
         plugins: loader => [
          require('postcss-rtl')()
        ]
      });
    
      return config;
    };
    
  • / node_modules / react-app-rewired / config-overrides. js

    const {paths} = require('./');
    // load environment variables from .env files
    // before overrides scripts are read
    require(paths.scriptVersion + '/config/env');
    const override = require(paths.configOverrides);
    
    const webpack = typeof override === 'function'
      ? override
      : override.webpack || ((config, env) => config);
    
    if (override.devserver) {
      console.log(
        'Warning: `devserver` has been deprecated. Please use `devServer` instead as ' +
        '`devserver` will not be used in the next major release.'
      )
    }
    
    const devServer = override.devServer || override.devserver
      || ((configFunction) =>
        (proxy, allowedHost) =>
          configFunction(proxy, allowedHost));
    
    const jest = override.jest || ((config) => config);
    
    const pathsOverride = override.paths || ((paths, env) => paths);
    
    // normalized overrides functions
    module.exports = {
      webpack,
      devServer,
      jest,
      paths: pathsOverride
    };
    

1 Ответ

0 голосов
/ 18 марта 2020

Проблема исправлена! еще раз запустите "npm install" funny

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...