Skip to content

Conversation

@rschristian
Copy link
Member

@rschristian rschristian commented Nov 25, 2021

What kind of change does this PR introduce?

feature (types)

Did you add tests for your changes?

N/A

Summary

Provides types for import that can help users with their config files. While this won't provide types for the entire default config, it does help correct a number of mistakes and/or typos.

Side note: I'm partial to moving the docs/webpack-helpers.md into the wiki, just to keep all that stuff together. Thoughts?

Does this PR introduce a breaking change?

No

@rschristian rschristian requested a review from a team as a code owner November 25, 2021 03:31
@changeset-bot
Copy link

changeset-bot bot commented Nov 25, 2021

🦋 Changeset detected

Latest commit: 0b9ee56

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment on lines +64 to +84
export type Env = {
src: string;
dest: string;
esm: boolean;
sw: boolean;
dev: boolean;
production: boolean;
isProd: boolean;
ssr: boolean;
prerender: boolean;
[key: string]: any;
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried to cover the commonly used ones that I've seen. Did I miss any that should be added?

@rschristian rschristian force-pushed the feat/config-types branch 2 times, most recently from 1492727 to fe2603b Compare November 27, 2021 07:03
@rschristian rschristian marked this pull request as draft November 28, 2021 00:16
@rschristian rschristian marked this pull request as ready for review November 28, 2021 01:37
@@ -1,154 +0,0 @@
### Table of Contents
Copy link
Member Author

@rschristian rschristian Nov 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Repeating the comment from above as it seems to have been read over)

I think it would be better to move this content into the wiki to keep everything together a bit more. Currently you have to switch between this doc and the wiki for some config information which is a bit awkward in my experience.

Certainly interested in thoughts, or maybe we should move the common config recipes into a doc instead? Not sure, just feels a bit disconnected at the moment.

@ForsakenHarmony ForsakenHarmony merged commit 0b298ae into master Nov 29, 2021
@ForsakenHarmony ForsakenHarmony deleted the feat/config-types branch November 29, 2021 10:46
@preact-bot preact-bot mentioned this pull request Nov 29, 2021
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

Successfully merging this pull request may close these issues.

3 participants