Browserify - How to call function bundled in a file generated through browserify in browser

前端 未结 11 2159
-上瘾入骨i
-上瘾入骨i 2020-11-29 17:18

I am new to nodejs and browserify. I started with this link .

I have file main.js which contains this code

var unique = require(\'uniq\');

var data          


        
11条回答
  •  -上瘾入骨i
    2020-11-29 17:51

    The key part of bundling standalone modules with Browserify is the --s option. It exposes whatever you export from your module using node's module.exports as a global variable. The file can then be included in a

提交回复
热议问题