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

Apply config when running dev server #176

Closed
anthonychu opened this issue Apr 8, 2021 · 8 comments
Closed

Apply config when running dev server #176

anthonychu opened this issue Apr 8, 2021 · 8 comments
Labels
good first issue Good for newcomers priority: medium (P1) Medium priority scope: cli Issues happened a the ./src/cli level type: enhancement New feature or request

Comments

@anthonychu
Copy link
Member

Is your feature request related to a problem? Please describe.
When running a dev server, config like rewrites, authorization are not applied.

Describe the solution you'd like
Apply config even when running dev server

  • staticwebapp.config.json in current directory: swa start http://localhost:8080
  • staticwebapp.config.json elsewhere: swa start http://localhost:8080 --routes-location web (or whatever the option is eventually named Rename --routes-location #175)

Config should apply to function app routes as well.

@manekinekko manekinekko added scope: cli Issues happened a the ./src/cli level type: enhancement New feature or request labels Apr 8, 2021
@manekinekko
Copy link
Member

staticwebapp.config.json in current directory: swa start http://localhost:8080

This can be easily fixed by removing this check:

if (!isStaticDevServer) {
userConfig = await handleUserConfig(SWA_CLI_ROUTES_LOCATION || SWA_CLI_APP_LOCATION);
}

@manekinekko manekinekko added the priority: medium (P1) Medium priority label Apr 8, 2021
@manekinekko manekinekko added the good first issue Good for newcomers label Apr 15, 2021
@fgiuliani
Copy link

@anthonychu @manekinekko can I take a look here? Do you have some guidance for a first-issuer? 😂

@manekinekko
Copy link
Member

Thank you @fgiuliani for offering your help. Please have a look at our contributing guide in order to get started.

@manekinekko
Copy link
Member

@fgiuliani We are planning to cut a minor release by end of week. Are you able to send a PR this week?

@fgiuliani
Copy link

Hi @manekinekko!
I'm able to work on this issue this week, but I think I need some guidance about the changes to be made.
I was looking at the contributing guide and the code of the app and I'm not sure I get what has to be done.

Thank you for the help and sorry for bothering you!

@manekinekko
Copy link
Member

Hey @fgiuliani we are going to refactor the proxy implementation (in #186) and this change will be affected. So we're gonna delay this feature for now.

@fgiuliani
Copy link

got it @manekinekko. Thank you!

@anthonychu
Copy link
Member Author

This should be addressed in #208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers priority: medium (P1) Medium priority scope: cli Issues happened a the ./src/cli level type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants