Browserifying libraries that were themselves browserified: relative paths error

后端 未结 2 1901
一整个雨季
一整个雨季 2020-12-06 06:31

I want to use a library that was build using browserify. The library built correctly and works fine when it is used by itself.

Now that built librar

相关标签:
2条回答
  • 2020-12-06 06:54

    aaaah, i finally got it working. using the standalone option of browserify along with gulp-derequire did the trick! yay!

    0 讨论(0)
  • 2020-12-06 06:57

    This seems to be pretty borked.

    Here are a few options:

    • Run derequire on myLib before consuming.

    • Try browserifying your app like so:

      browserify({
        entries: ['./entry'],
        noParse: ['/abs/path/to/vendors/myLib.js'],
      })
      

      If it doesn't work, try it without the extension in the noParse value.

    • Minify myLib before consuming it.

    0 讨论(0)
提交回复
热议问题