Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Provide a simple way to differentiate between build types #232
-Probably a simple one.
I do not see a simple way to differentiate during the build process between a local build (for example with
Would it be possible to include some type of environment variable to distinguish local and AWS builds?
Best option I dound so far is
Less importantly, serverless options are not passed to the build process (notably the stage). This one is less critical – as it is possible to point from
You could check if they are already available when the webpack config is loaded (never checked that).
If you want to distinguish the settings in your
// webpack config const slsw = require('serverless-webpack'); const options = slsw.lib.options; const serverless = slsw.lib.serverless;
Options contains all command line options (as well as the stage) and
Additionally you should set
I checked Serverless. The most robust solution would be that Serverless and serverless-offline would set the local indicator variables in their
For now, there might be the possibility to check the
@pierreis I found a possible solution for the recognition without having to fix each and every plugin that does anything offline or locally. PR #334 adds a new
So any check for
Could you tell me if that will work for you and probably make a test with (