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

Add @emotion/* dependencies to babel-plugin-emotion READMEs #1254

Closed

Conversation

elliottsj
Copy link

What:

Add @emotion/* dependencies to babel-plugin-emotion / @emotion/babel-preset-css-prop READMEs

Why:

babel-plugin-emotion includes macros which may generate application code
that imports these packages, e.g.

import _styled from "@emotion/styled-base";

Normally, this is not a problem when using popular package managers like
npm / yarn because '@emotion/styled-base' is a transitive
dependency of '@emotion/styled', which is hoisted to the root
node_modules folder, enabling it to be found by webpack / node:

node_modules/
  @emotion/styled/
    ...
  @emotion/styled-base/
    ...

But when using strict package managers such as pnpm (or yarn pnp),
@emotion/styled-base cannot be resolved because it can only be resolved
by code inside the @emotion/styled package:

node_modules/
  @emotion/styled/
    ...
    node_modules/
      @emotion/styled-base/
      ...

Adding these to the respective READMEs of both babel packages should
help users avoid this issue.

How:

Manually editing README.md files.

Checklist:

  • Documentation
  • Tests N/A
  • Code complete N/A

babel-plugin-emotion includes macros which may generate application code
that imports these packages, e.g.

    import _styled from "@emotion/styled-base";

Normally, this is not a problem when using popular package managers like
npm / yarn because '@emotion/styled-base' is a transitive
dependency of '@emotion/styled', which is hoisted to the root
node_modules folder, enabling it to be found by webpack / node:

    node_modules/
      @emotion/styled/
        ...
      @emotion/styled-base/
        ...

But when using strict package managers such as pnpm (or yarn pnp),
@emotion/styled-base cannot be resolved because it can only be resolved
by code inside the @emotion/styled package:

    node_modules/
      @emotion/styled/
        ...
        node_modules/
          @emotion/styled-base/
          ...

Adding these to the respective READMEs of both babel packages should
help users avoid this issue.
@netlify
Copy link

netlify bot commented Mar 1, 2019

Preview Docs

Built with commit bebd5ac

https://deploy-preview-1254--emotion.netlify.com

@Andarist
Copy link
Member

This will be fixed when we land #1575 . Closing it right now though to clean up the issue tracker.

@Andarist Andarist closed this Oct 29, 2019
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.

2 participants