javascript - How to create vendor bundles with latest Browserify (6.x.x)? -
Well, now we are using BrowserFet 2.x for a while. We are going through some refactoring so that we want to update the latest browser in the future to reduce the future leap forward.
Unfortunately some external bundles are controlled. In the old version we can simply tell Browserify, which requires the modules to be excluded from the bundle and they need something else - basically what it is.
Version 5.0.0 has some major changes in BrowserWorld Internal. Let's take this command for example. The Running this command in the browser command @ 4, the output file will look like this: now looks like Browserify @ 5: To complete the equation, I have a simple file that requires If you want to see the file, then the argument is that just using the pre-defined global All I'm able to find is the change: Hashing has been exposed: For accurate-export bundles, the right or explicit exposure ID is required. What I can not find is actually the meaning: ( You should be able to create your own seller bundle in this way: and then your app bundle Make: it works just fine (I am using Actually, even if debug module is the NPM module.
BrowserFiD Debug-o vendor.js
requirement = (function ... {"debug": [function (required, module, export) requires {module.exports = ('2 BVKWP'));}, { }}, "2 BVKWP": [function (requirement, module, export) {// actual code debug module}, {}]});
required = (function ... {1: [function (required, module, export ) {// actual code from debug module}, {}]});
('debug') and it is bundled with the command
browserify -x debug -e Index.js -o main.js Internal dependency is set to the
debug module on the undefined , which is fine.
requirement (
pastRequIRE stored in the variable) The module is not to be defined in the current bundle but since it does not reveal anything like
vendor.js
browserify -r debug> vendor.js
Browser application The ordering index.js -x debug & gt; main.js
browserify@6.1.0 ) .
is required ('debug'); will not work in the browser console, as a browser in the seller bundle
Debug module until the bundles are loaded into correct order, i.e.
Comments
Post a Comment