Stencil: [Feature Request] Proxy Option for Development Server

Created on 2 Jul 2018  路  4Comments  路  Source: ionic-team/stencil

Stencil version:

 @stencil/core@<version>

I'm submitting a:

[ ] bug report
[X] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Copied from https://github.com/ionic-team/stencil-dev-server/issues/26

Request for that development server supports proxying files from another server for given urls.
So it can be configured like this in stencil.config.js:

exports.devServer = {
  root: 'www',
  watchGlob: '**/**',
  proxy: {
    '{URL_PATTERN}': '{API_URL}'
  }
}
dev-server help wanted

Most helpful comment

Can we re-open this issue? The fact that the dev server moved into core had nothing to do with resolving this feature request, and the issue is linked to stencil core on Github as you would expect.

All 4 comments

The dev server has since moved to the integrated dev server within @stencil/core. Happy to help answer any questions with stencil slack for anyone interested in contributing. Thanks.

Can we re-open this issue? The fact that the dev server moved into core had nothing to do with resolving this feature request, and the issue is linked to stencil core on Github as you would expect.

Did anyone discover a way to set up proxy for development environment? I am trying to create a login component in my dev environment that's posting auth information on an api hosted elsewhere. Keep running into CORS issues and would like to set up proxying. I've done this same proof-of-concept with a react app.

@sunbot! I'm using my own implementation and it's working fine. I hope some day stencil will include this feature into their dev server too. I've put the code to a gist.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

elmariofredo picture elmariofredo  路  3Comments

Salet picture Salet  路  3Comments

joewoodhouse picture joewoodhouse  路  3Comments

MrMcGibblets picture MrMcGibblets  路  3Comments

noahlaux picture noahlaux  路  3Comments