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

Options #9

Closed
geekact opened this issue Dec 9, 2022 · 5 comments
Closed

Options #9

geekact opened this issue Dec 9, 2022 · 5 comments

Comments

@geekact
Copy link

geekact commented Dec 9, 2022

Add options to configure where needs ssl, for example:

ssl({
  server: true,
  preview: true,
});

Or just checking config

const https = { cert: '', key: '' };

if (config?.server.https === true) {
 // assign https
}
if (config?.preview.https === true) {
  // assign https
}
@sand4rt
Copy link

sand4rt commented Dec 25, 2022

Library authors can't check if https is set when config?.server.https or config?.preview.https is not specified right? Why not specify it like?:

export default defineConfig({
  plugins: [basicSsl()],
  server: {
    https: true
  },
  preview: {
    https: true
  }
});

related: microsoft/playwright#19697

@geekact
Copy link
Author

geekact commented Dec 25, 2022

Library authors can't check if https is set when config?.server.https or config?.preview.https is not specified right? Would specify it instead like:

export default defineConfig({
  plugins: [basicSsl()],
  server: {
    https: true
  },
  preview: {
    https: true
  }
});

You are providing a new way and it just up to maintainers.

@sand4rt
Copy link

sand4rt commented Dec 28, 2022

Yeah it's up to the maintainers. I'm just sharing some thoughts here :) It's not really a new way or do i miss something?: preview.https type: boolean | https.ServerOptions

@digiinsanity
Copy link
Contributor

Being able to set the proposed options or for the plugin to respect the user defined settings would be beneficial.
To address the issue, i created PR #16.

@bluwy
Copy link
Member

bluwy commented Jan 25, 2024

This is fixed in #16

@bluwy bluwy closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants