Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

static-site: fix formatting of sst-env.d.ts with Vite env vars #1042

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

paolostyle
Copy link
Contributor

@paolostyle paolostyle commented Sep 11, 2024

Before:

/// <reference types="vite/client" />
  interface ImportMetaEnv {
    readonly ENV_ONE: string
  readonly ENV_TWO: string
  readonly ENV_THREE: string
  }
  interface ImportMeta {
    readonly env: ImportMetaEnv
  }

After:

/* This file is auto-generated by SST. Do not edit. */
/* tslint:disable */
/* eslint-disable */
/// <reference types="vite/client" />
interface ImportMetaEnv {
  readonly ENV_ONE: string
  readonly ENV_TWO: string
  readonly ENV_THREE: string
}
interface ImportMeta {
  readonly env: ImportMetaEnv
}

Let me know if you think I should also add the comments at the top as for the regular sst-env.d.ts. Updated.

image

@jayair
Copy link
Contributor

jayair commented Sep 13, 2024

lol this is good

Yeah the comments would help.

@paolostyle
Copy link
Contributor Author

@jayair I added the comments

@jayair
Copy link
Contributor

jayair commented Sep 20, 2024

Thanks!

@thdxr thdxr merged commit 79ede79 into sst:dev Oct 18, 2024
@paolostyle paolostyle deleted the static-site-env-format branch October 18, 2024 19:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants