Commit Graph

2 Commits

Author SHA1 Message Date
Pascal Precht 031ebe8bb2 fix(plugins/basic-pipeline): ensure correct webpack config is loaded
When making `basic-pipeline` in 948956ab1f we've introduced a regression
and with this fix, a behaviour change as well::

1. The `webpackConfigName` passed to `Engine` is completely ignored, caused it to be
  `undefined` down the line when the plugin tries to do its work (we essentially broke bundling)
2. With that configuration being ignored, we need a new way to make this configurable.
  Since `basic-pipeline` is now a true plugin, it makes sense for itself to have configuration
  options for that, while still providing decent defaults.
3. The trickly thing is that `webpackConfigName` used to have different values per command.
  For example `build` used to use `production` while `run` used `development` as config.
4. This commit introduces new configuration options for `basic-pipeline` that lets users configure
the `webpackConfigName` per environment:

```json
// embark.json
{
  ...
  "plugins": {
    "embark-basic-pipeline": {
      "development": {
        webpackConfigName: "development"
      },
      "production": {
        webpackConfigName: "production"
      }
    }
  }
}
```
^ These are also the defaults. So not providing this configuration will make
Embark imply it.

Notice that this does not account for the "different config per command" case.
This means `embark build` will also use `development` by default.

Prior to this commit and the one mentioned above, the `webpackConfigName` was configurable
through the CMD `--pipeline` option. Since this a) no longer a built-in feature
and b) ignored at the moment anyways, I've removed the `--pipeline` options
from all commands as well.

BREAKING CHANGES

The commands `embark eject-webpack` and `embark eject-build-config` are no longer available.
The `--pipeline` option has been removed from all commands that used to support it.
2020-03-23 15:19:58 +01:00
Pascal Precht 64731cf985 chore: move embark site into mono repo 2019-04-29 13:00:58 +02:00