Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to avoid duplicate optimizer config for each function? #30

Open
martinmicunda opened this issue Mar 24, 2016 · 0 comments
Open

How to avoid duplicate optimizer config for each function? #30

martinmicunda opened this issue Mar 24, 2016 · 0 comments

Comments

@martinmicunda
Copy link
Contributor

The serverless v0.0.5 has removed the concept of components so I tried to move the optimizer config from s-component.json to s-project.json however this doesn't work and as it mentions in the doc optimizer config needs to be add to each s-function.json so my question is, is there a way how we could avoid duplicate this config for each function either by placing this config to s-project.json or add it to s-templates.json (template options doesn't work as it doesn't seem to compile optimize template).

s-templates.json

    "optimize": {
      "exclude": [
        "aws-sdk"
      ],
      "transforms": [
        {
          "name": "babelify",
          "opts": {
            "presets": [
              "es2015",
              "stage-2"
            ]
          }
        }
      ],
      "minify": false
    }

s-function.json

  "custom": {
    "excludePatterns": [ "aws-sdk"],
    "optimize": "$${optimize}"
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant