pluginfactory / react-starter

This is the sample scaffolder app for react JS including redux, router and webpack build
3 stars 2 forks source link

Updating the packages as per node 10.17.0 #8

Open ops-gaurav opened 4 years ago

ops-gaurav commented 4 years ago

This document is regarding the updating of react-starter as per node 10.17.0 LTS. We are making changes to the packages updates by making sure that everything is working fine.

Following are the admin panel changelogs:

  1. Uninstalling the following packages:
    npm uninstall --save babel-core babel-loader babel-preset-es2015 babel-preset-react webpack
  2. Add the following package to dependencies:
    npm install --save webpack@4.42.0
  3. Uninstall the following dev dependencies:
    npm uninstall --save-dev extract-text-webpack-plugin html-webpack-plugin
  4. Install the following dev dependencies:
    npm install --save-dev @babel/core@7.9.0 @babel/plugin-transform-runtime@7.9.0 @babel/preset-react@7.9.4 @babel/register@7.9.0 babel-loader@8.1.0 babel-preset-es2015@6.24.1 extract-text-webpack-plugin@4.0.0-beta.0 html-webpack-plugin@3.2.0 webpack-cli@3.3.11
    1. Update the.babelrc for the latest react configuration.
      {
      "presets": ["@babel/react"],
      "plugins": [
      [
          "@babel/plugin-transform-runtime",
          {
              "regenerator": true
          }
      ]
      ]
      }
  5. Update the webpack.config.js file by removing the query from babel-loader rules which was :
    {
    test: /\.jsx?/,
    include: APP_DIR,
    loader: 'babel-loader',
    query: {
      presets: ['es2015'],
    },
    },

    which now becomes:

    {
    test: /\.jsx?/,
    include: APP_DIR,
     loader: 'babel-loader',
    },
ops-gaurav commented 4 years ago

Tried this with 3-4 projects and fix is working very smoothly.