Question: How do I specifically turn on browserField for particular requires?
See original GitHub issueI am programatically generating a bundle:
var browserify = require('browserify'),
bundle = browserify({
insertGlobalVars: false,
detectGlobals: true,
browserField: false,
bare: true,
builtins: false,
commondir: true
});
bundle.require('crypto-browserify', {
expose: 'crypto',
browserField: true // THIS IS WHAT I WANT TO DO
});
In the above code, I want to bundle all code with browserField turned off, but only turn it on for the particular crypto-browserify
require. How do I do it? I may have missed something in documentation, but please excuse me for that.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
Force users to sign in to Chrome Browser (user policies only)
Click Settings Go to Sign-in settings. For Browser sign-in settings, select Force users to sign-in to use the browser. Click Save.
Read more >How to turn off form autocompletion - Web security | MDN
This article explains how a website can disable autocomplete for form fields.
Read more >What happens when you type a URL into your browser? - AWS
2. Browser looks up IP address for the domain. After you've typed the URL into your browser and pressed enter, the browser needs...
Read more >Easy Checks – A First Review of Web Accessibility - W3C
Tab to all: Check that you can tab to all the elements, including links, form fields, buttons, and media player controls. (A common...
Read more >Chrome Browser Privacy Policy - Google
Here's everything you need to know about your privacy while ... Details specific to Chrome are provided in this Notice where relevant.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had given myself a full week to see if anyone from community can show me a direction before I deep dive.
My plan otherwise is to write a transformer that takes in package names and when those requires are encountered, return the browser-require result instead of original.
Yep. I’ve accommodated basics in github.com/postmanlabs/postman-sandbox but didn’t get time to extract it out as an independent module