How to bundle multiple javascript libraries with browserify?

前端 未结 2 1134
死守一世寂寞
死守一世寂寞 2021-01-15 15:19

I\'m trying to use Browerifiy in the browser, if I use the standalone option it exposes one module. I don\'t want to do this. The website and documentation just seems to cut

2条回答
  •  感情败类
    2021-01-15 16:15

    You have two choices here. Either you

    SOLUTION 1

    Create a standalone browserify module for each library you want to access in your browser. This has been answered in your other post. Basically you do multiple browserify bundles.

    .

    browserify library1.js --standalone Library1 -o library1-bundle.js
    browserify library2.js --standalone Library2 -o library2-bundle.js
    browserify library3.js --standalone Library3 -o library3-bundle.js
    
     
    
                                     
                  
提交回复
热议问题