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}'
}
}
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.
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.