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

feat(@angular-devkit/build-angular): support ESM proxy configuration files for the dev server #21792

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

clydin
Copy link
Member

@clydin clydin commented Sep 22, 2021

The proxyConfig option now supports loading ESM configuration files in addition to JSON and CommonJS files. ESM files (such as those ending with .mjs) must provide a default export with the configuration object.
For example, a proxy.config.mjs containing the follow is now possible:

export default { "/api/*": { "target": "http://127.0.0.1:5001" } };

Closes #21623

@google-cla google-cla bot added the cla: yes label Sep 22, 2021
@clydin clydin added the target: minor This PR is targeted for the next minor release label Sep 23, 2021
@clydin clydin marked this pull request as ready for review September 23, 2021 17:59
…files for the dev server

The `proxyConfig` option now supports loading ESM configuration files in addition to JSON and CommonJS files. ESM files (such as those ending with `.mjs`) must provide a default export with the configuration object.
For example, a `proxy.config.mjs` containing the follow is now possible:
```
export default { "/api/*": { "target": "http://127.0.0.1:5001" } };
```

Closes angular#21623
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Sep 24, 2021
@clydin clydin merged commit fb1ad7c into angular:master Sep 24, 2021
@clydin clydin deleted the esm/proxy-config branch September 24, 2021 12:20
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ESModules for proxy.config file
2 participants