问题
I have a module module.js
which itself has dependencies. Some dependencies are local via require('./relative/import/path.js')
while other dependencies are from npm via require('npm/import/path.js')
.
My module has it's own exports via module.exports = { myfunc: myfunc }
. Other JavaScript files need to require('./path/to/modules.js')
so they can use myfunc.
How can I bundle together all the dependencies and ship my module as a stand-alone thing?
note: Browserify fails to allow me to export myfunc.
来源:https://stackoverflow.com/questions/56740359/how-do-i-bundle-a-javascript-module-with-npm-dependencies-to-have-0-dependencies