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

multiple webpack config files #102

Closed
ricardolpd opened this issue Feb 15, 2017 · 2 comments
Closed

multiple webpack config files #102

ricardolpd opened this issue Feb 15, 2017 · 2 comments

Comments

@ricardolpd
Copy link

Hi guys,

As far as i can see there is no way to to put more than one webpack config file when using this extension. Am I correct or is there any way to achieve this, besides having to manually type different files in the serverless.yml file?

If your framework doesnt support this yet, is this something you guys would be up to have?
If so what would be your preferred method of achieving this?

As far a our needs go we would like to have a production file and a development one (as we would like to remove source-maps and other bits from our config file).

@domaslasauskas
Copy link
Contributor

There is no need for this plugin to have such functionality as you already have many ways to achieve this. Here is just a couple:

  • Use variables in your serverless.yml
custom:
  webpack: webpack.config.${self:opt.stage, self:provider.stage}.js
  • Webpack config is just a .js file, so you can add all the logic there to handle different configuration for your environments.

@ricardolpd
Copy link
Author

Thanks for your reply, i didnt realise we could do such variables in serverless as we just started using it, so we probably use that solution.

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

2 participants