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

@reach/utils: checkStyles warns in test environment #466

Open
KubaJastrz opened this issue Feb 13, 2020 · 4 comments
Open

@reach/utils: checkStyles warns in test environment #466

KubaJastrz opened this issue Feb 13, 2020 · 4 comments
Labels
Help Wanted Extra attention is needed Type: Enhancement General improvements or suggestions

Comments

@KubaJastrz
Copy link
Contributor

KubaJastrz commented Feb 13, 2020

🐛 Bug report

Current Behavior

  console.warn node_modules/@reach/utils/dist/utils.cjs.development.js:64
    @reach/tabs styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:

        import "@reach/tabs/styles.css";
    import warning from 'warning';

      Otherwise you'll need to include them some other way:

        <link rel="stylesheet" type="text/css" href="node_modules/@reach/tabs/styles.css" />

      For more information visit https://ui.reach.tech/styling.

Expected behavior

No warning, because of the following line:

process.env.NODE_ENV !== "test" &&

It seems like the line is stripped in the cjs dist files.

Reproducible example

Suggested solution(s)

Additional context

Your environment

I'm using [email protected] with @babel/[email protected] (I don't remember why exactly I have this plugin, but I suspect this might be causing the issue, as in the esm dist file the line is not stripped).

Software Name(s) Version
Reach Package @reach/utils 0.8.2
React
Browser
Assistive tech
Node
npm/yarn
Operating System
@KubaJastrz
Copy link
Contributor Author

(btw: this import warning from 'warning'; line looks like some merging issue, not sure why it's even included in the log message)

@chaance chaance added the Type: Enhancement General improvements or suggestions label Feb 13, 2020
@chaance
Copy link
Member

chaance commented Feb 15, 2020

Can you test again with 0.8.4 and let me know if you still have this issue? Scratch that, this will get done and re-tested next week.

@chaance
Copy link
Member

chaance commented Feb 21, 2020

Should be good in 0.8.5. Please let me know if you still have an issue here.

@chaance chaance closed this as completed Feb 21, 2020
@Kosai106
Copy link

@chaance We just upgraded @reach/tabs to 0.16.1 from 0.6.1 and this is happening still. Maybe a regression was introduced somewhere?

@chaance chaance reopened this Nov 15, 2021
@chaance chaance added the Help Wanted Extra attention is needed label Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Extra attention is needed Type: Enhancement General improvements or suggestions
Projects
None yet
Development

No branches or pull requests

3 participants