question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test "__DEV__" in a browser compatible way.

See original GitHub issue

When attempting to get browser optimized builds of the library via @popperjs/core/dist/esm/... paths the files in question don’t seem to have access to types that would be needed to leverage them in a Typescript project. Can the build process be tweaked to include this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
TrySoundcommented, Nov 13, 2020

It won’t work. See my comment in PR. If you need popper scripts to work in browser without build step just define process.env.NODE_ENV globally before injecting these scripts.

1reaction
Westbrookcommented, Nov 3, 2020

Alternatively, it would be really great to see the browser optimized build be the default module export instead of the development optimized build, which would allow to get both types and optimized code in the same place.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cross Browser Compatibility Testing beyond Chrome
Cross browser compatibility testing is a non-functional form of testing, which emphasizes on availing your website's basic features and ...
Read more >
Introduction to cross-browser testing - Learn web development
Cross-browser testing is the practice of ensuring that a website works across various browsers and devices. Web developers should consider:.
Read more >
Top 10 Cross Browser Testing Tools In 2023 (Latest Ranking)
Katalon Studio is the most popular Selenium and Appium alternative for cross-browser testing by 850,000 testers and developers trust. Also ...
Read more >
7 tips for successful cross browser compatibility testing
1 Perform Code Validation · 2 Build Browser Matrix · 3 Always Verify Feature Support · 4 Skip Unnecessary Components · 5 Choose...
Read more >
Top 12 Browser Compatibility Testing Tools - KeyCDN
Browser Sandbox is a tool run by turbo.net, which allows you a unique way to test web browser issues. Turbo.net is a web-based...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found