Stop Heroku from Pruning Dev Dependencies










0














I have been trying to stop heroku from pruning my dev dependencies. Here is my config:
My build script is: "build": "NPM_CONFIG_PRODUCTION=false webpack -mode production"
And I have added "heroku-postbuild": "npm run build"
My Dependencies:



"dependencies": 
"express": "^4.16.3",
"react": "^16.5.2",
"react-dom": "^16.5.2"
,
"devDependencies":
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.0",
"babel-loader": "^8.0.0",
"clean-webpack-plugin": "^0.1.19",
"concurrently": "^4.0.0",
"css-loader": "^1.0.0",
"eslint": "^5.0.0",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"file-loader": "^2.0.0",
"html-webpack-plugin": "^3.2.0",
"nodemon": "^1.17.3",
"style-loader": "^0.23.0",
"url-loader": "^1.0.1",
"webpack": "^4.5.0",
"webpack-cli": "^3.0.8",
"webpack-dev-server": "^3.1.3"



I would appreciate any help with the config as I don't want to add my dev dependencies to my dependencies.










share|improve this question


























    0














    I have been trying to stop heroku from pruning my dev dependencies. Here is my config:
    My build script is: "build": "NPM_CONFIG_PRODUCTION=false webpack -mode production"
    And I have added "heroku-postbuild": "npm run build"
    My Dependencies:



    "dependencies": 
    "express": "^4.16.3",
    "react": "^16.5.2",
    "react-dom": "^16.5.2"
    ,
    "devDependencies":
    "@babel/core": "^7.0.0",
    "@babel/plugin-proposal-class-properties": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@babel/preset-react": "^7.0.0",
    "babel-eslint": "^10.0.0",
    "babel-loader": "^8.0.0",
    "clean-webpack-plugin": "^0.1.19",
    "concurrently": "^4.0.0",
    "css-loader": "^1.0.0",
    "eslint": "^5.0.0",
    "eslint-config-airbnb": "^17.0.0",
    "eslint-plugin-import": "^2.11.0",
    "eslint-plugin-jsx-a11y": "^6.0.3",
    "eslint-plugin-react": "^7.7.0",
    "file-loader": "^2.0.0",
    "html-webpack-plugin": "^3.2.0",
    "nodemon": "^1.17.3",
    "style-loader": "^0.23.0",
    "url-loader": "^1.0.1",
    "webpack": "^4.5.0",
    "webpack-cli": "^3.0.8",
    "webpack-dev-server": "^3.1.3"



    I would appreciate any help with the config as I don't want to add my dev dependencies to my dependencies.










    share|improve this question
























      0












      0








      0







      I have been trying to stop heroku from pruning my dev dependencies. Here is my config:
      My build script is: "build": "NPM_CONFIG_PRODUCTION=false webpack -mode production"
      And I have added "heroku-postbuild": "npm run build"
      My Dependencies:



      "dependencies": 
      "express": "^4.16.3",
      "react": "^16.5.2",
      "react-dom": "^16.5.2"
      ,
      "devDependencies":
      "@babel/core": "^7.0.0",
      "@babel/plugin-proposal-class-properties": "^7.0.0",
      "@babel/preset-env": "^7.0.0",
      "@babel/preset-react": "^7.0.0",
      "babel-eslint": "^10.0.0",
      "babel-loader": "^8.0.0",
      "clean-webpack-plugin": "^0.1.19",
      "concurrently": "^4.0.0",
      "css-loader": "^1.0.0",
      "eslint": "^5.0.0",
      "eslint-config-airbnb": "^17.0.0",
      "eslint-plugin-import": "^2.11.0",
      "eslint-plugin-jsx-a11y": "^6.0.3",
      "eslint-plugin-react": "^7.7.0",
      "file-loader": "^2.0.0",
      "html-webpack-plugin": "^3.2.0",
      "nodemon": "^1.17.3",
      "style-loader": "^0.23.0",
      "url-loader": "^1.0.1",
      "webpack": "^4.5.0",
      "webpack-cli": "^3.0.8",
      "webpack-dev-server": "^3.1.3"



      I would appreciate any help with the config as I don't want to add my dev dependencies to my dependencies.










      share|improve this question













      I have been trying to stop heroku from pruning my dev dependencies. Here is my config:
      My build script is: "build": "NPM_CONFIG_PRODUCTION=false webpack -mode production"
      And I have added "heroku-postbuild": "npm run build"
      My Dependencies:



      "dependencies": 
      "express": "^4.16.3",
      "react": "^16.5.2",
      "react-dom": "^16.5.2"
      ,
      "devDependencies":
      "@babel/core": "^7.0.0",
      "@babel/plugin-proposal-class-properties": "^7.0.0",
      "@babel/preset-env": "^7.0.0",
      "@babel/preset-react": "^7.0.0",
      "babel-eslint": "^10.0.0",
      "babel-loader": "^8.0.0",
      "clean-webpack-plugin": "^0.1.19",
      "concurrently": "^4.0.0",
      "css-loader": "^1.0.0",
      "eslint": "^5.0.0",
      "eslint-config-airbnb": "^17.0.0",
      "eslint-plugin-import": "^2.11.0",
      "eslint-plugin-jsx-a11y": "^6.0.3",
      "eslint-plugin-react": "^7.7.0",
      "file-loader": "^2.0.0",
      "html-webpack-plugin": "^3.2.0",
      "nodemon": "^1.17.3",
      "style-loader": "^0.23.0",
      "url-loader": "^1.0.1",
      "webpack": "^4.5.0",
      "webpack-cli": "^3.0.8",
      "webpack-dev-server": "^3.1.3"



      I would appreciate any help with the config as I don't want to add my dev dependencies to my dependencies.







      heroku






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 12 '18 at 5:41









      Rohan DharRohan Dhar

      1,043317




      1,043317






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Set Heroku env var NPM_CONFIG_PRODUCTION to false with




          heroku config:set NPM_CONFIG_PRODUCTION=false




          instead of trying to set it in your npm script.






          share|improve this answer




















          • Is there no way I can do it through my scripts config, instead of explicitly declaring the env variable? What I mean is that my intension was to do it through the scripts. Do you know where am I going wrong?
            – Rohan Dhar
            Nov 13 '18 at 3:21










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53256460%2fstop-heroku-from-pruning-dev-dependencies%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Set Heroku env var NPM_CONFIG_PRODUCTION to false with




          heroku config:set NPM_CONFIG_PRODUCTION=false




          instead of trying to set it in your npm script.






          share|improve this answer




















          • Is there no way I can do it through my scripts config, instead of explicitly declaring the env variable? What I mean is that my intension was to do it through the scripts. Do you know where am I going wrong?
            – Rohan Dhar
            Nov 13 '18 at 3:21















          0














          Set Heroku env var NPM_CONFIG_PRODUCTION to false with




          heroku config:set NPM_CONFIG_PRODUCTION=false




          instead of trying to set it in your npm script.






          share|improve this answer




















          • Is there no way I can do it through my scripts config, instead of explicitly declaring the env variable? What I mean is that my intension was to do it through the scripts. Do you know where am I going wrong?
            – Rohan Dhar
            Nov 13 '18 at 3:21













          0












          0








          0






          Set Heroku env var NPM_CONFIG_PRODUCTION to false with




          heroku config:set NPM_CONFIG_PRODUCTION=false




          instead of trying to set it in your npm script.






          share|improve this answer












          Set Heroku env var NPM_CONFIG_PRODUCTION to false with




          heroku config:set NPM_CONFIG_PRODUCTION=false




          instead of trying to set it in your npm script.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 12 '18 at 8:44









          Yoni RabinovitchYoni Rabinovitch

          2,97511022




          2,97511022











          • Is there no way I can do it through my scripts config, instead of explicitly declaring the env variable? What I mean is that my intension was to do it through the scripts. Do you know where am I going wrong?
            – Rohan Dhar
            Nov 13 '18 at 3:21
















          • Is there no way I can do it through my scripts config, instead of explicitly declaring the env variable? What I mean is that my intension was to do it through the scripts. Do you know where am I going wrong?
            – Rohan Dhar
            Nov 13 '18 at 3:21















          Is there no way I can do it through my scripts config, instead of explicitly declaring the env variable? What I mean is that my intension was to do it through the scripts. Do you know where am I going wrong?
          – Rohan Dhar
          Nov 13 '18 at 3:21




          Is there no way I can do it through my scripts config, instead of explicitly declaring the env variable? What I mean is that my intension was to do it through the scripts. Do you know where am I going wrong?
          – Rohan Dhar
          Nov 13 '18 at 3:21

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53256460%2fstop-heroku-from-pruning-dev-dependencies%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Use pre created SQLite database for Android project in kotlin

          Darth Vader #20

          Ondo