How to configure a SPA on loading?

后端 未结 4 1702
孤独总比滥情好
孤独总比滥情好 2021-01-13 04:05

We are using Webpack, React, Node.JS but I think this question is more generic that the specific technologies. I can use Webpack to configure the SPA when building for deve

4条回答
  •  一个人的身影
    2021-01-13 04:35

    Our current code uses WebPack DefinePlugin but I don't believe this allows one to do what we need. I have also found the ExtendedDefinePlugin which mentions the client but again, I am unsure if it is a possible solution:

    https://github.com/ArikMaor/extended-define-webpack-plugin https://www.npmjs.com/package/extended-define-webpack-plugin

    The DefinePlugin is also discussed here:

    Passing environment-dependent variables in webpack

    But again I don't believe this will allow us to configure the client SPA based upon the deployment context rather than the build context.

提交回复
热议问题