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

Clean usage of @types/webpack-env dep in all packages #9536

Merged
merged 1 commit into from
Jan 20, 2020
Merged

Conversation

gaetanmaisse
Copy link
Member

Issue: #7855

What I did

Clean usage of @types/webpack-env dep in all packages:

  • @types/webpack-env must be defined as dependencies in packages that export a type/function using typings from @types/webpack-env (it is often NodeModule). In that case /// <reference types="webpack-env" /> is present in some files of the dist folder of the lib. Example: lib/client-api.
  • @types/webpack-env must be defined as devDependencies in packages that use its typings internally but does not expose anything related to it. Many addons need the types because they use module.hot function. Example: addons/a11y
  • webpack-env should be removed from "compilerOptions.types" key of tsconfig.json of packages that don't need it.

I also bump @types/webpack-env to ^1.15.0 to have the same version all across the monorepo.

@vercel
Copy link

vercel bot commented Jan 19, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/fmguac8k9
✅ Preview: https://monorepo-git-fix-webpack-env.storybook.now.sh

 - `@types/webpack-env` must be defined as `dependencies` in packages that export a type/function using typings from `@types/webpack-env` (it is often `NodeModule`). In that case `/// <reference types="webpack-env" />` is present in some files of the `dist` folder of the lib. Example: `lib/client-api`.
 - `@types/webpack-env` must be defined as `devDependencies` in packages that use its typings internally but does not expose anything related to it. Many addons need the type because they use `module.hot` function. Example: `addons/a11y`
 - `webpack-env` should be removed from "compilerOptions.types" key of `tsconfig.json` of packages that don't need it.

 I also bump `@types/webpack-env` to ^1.15.0 to have the same version all across the monorepo
@shilman shilman added this to the 5.3.x milestone Jan 20, 2020
@shilman shilman merged commit 5779f18 into next Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants