aurelia / aurelia/cli

Webpack devServer options ignored when using au run

Open
#794 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
402
Forks
134
PR merge metrics
No merged PRs in 30d

Description

**I'm submitting a feature request**

* **Library Version:**
aurelia-cli@0.32.0

**Please tell us about your environment:**
* **Operating System:**
Windows 10

* **Node Version:**
9.2.0

* **NPM Version:**
5.5.1

* **Browser:**
Firefox

* **Language:**
Typescript

* **Loader/bundler:**
Webpack

**Current behavior:**
Setting proxy, or other devServer configuration options, in webpack.config.json is ignored when using au run. This is because the run task (tasks/run.ts) creates its own options object and uses that.

* **What is the expected behavior?**
The devServer configuration from webpack.config.json options should be honored. My request is to move the opts configuration from run.ts into webpack.config.json, or at least merge the two configuration when run is invoked.

* **What is the motivation / use case for changing the behavior?**
Users familiar with webpack would be setting devServer options in webpack configuration file. Expecting that this would work, especially since the CLI places some devServer configuration options there, I spent an entire day troubleshooting why I couldn't get my proxy configuration to work. After some help from the gitter chat, I realized that the devServer options were being ignored entirely.

After looking at the run task (tasks/run.ts), I saw that it creates its own server options and completely ignores the options in webpack, using an opts object it creates in the task. After setting my proxy configuration there in run.ts, the proxy works fine.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.