Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-99249

Liferay NPM Scripts deploying only in production mode

    Details

    • Fix Priority:
      5

      Description

      I'm facing an issue to build Workflow Metrics module (liferay-portal-ee) in development mode. Even using cross-env, the result is the same. Below, one of the scripts I tested.
       
      "scripts": {
              "build": "cross-env NODE_ENV=development liferay-npm-scripts build", ...
      }
       

      Expected Result:

      Build the module in development mode.

       

      Actual Result:

      The module is built in production mode. Also, an error is shown on console:

      Uncaught Error: React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://fb.me/react-perf-use-the-production-build
      {{ at <anonymous>:1:204}}
      (anonymous) @ VM8695:1
      setTimeout (async)
      checkDCE @ VM8695:1
      checkDCE @ index.js:23
      (anonymous) @ index.js:34
      (anonymous) @ loader.js:579
      value @ loader.js:516
      (anonymous) @ loader.js:332
      Promise.then (async)
      value @ loader.js:320
      (anonymous) @ manage?p_p_id=com_liferay_portal_workflow_metrics_web_internal_portlet_WorkflowMetricsPortlet&p_p_lifecycle=0&p_p_state=maximized&p_v_l_s_g_id=20122:4415

       

       

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  14 weeks ago

                  Packages

                  Version Package