简体   繁体   中英

How to use Webpack ProvidePlugin to load Backbone-relational right?

I have defined webpack ProvidePlugin to load Backbone-relational library as follows.

plugins: [
    new webpack.ProvidePlugin({
        $ : "jquery",
        Backbone : "backbone",
        _ : "underscore",
        "Backbone.Relational": "backbone-relational",
    })

However Backbone-relational also exports:

  • Backbone.RelationalModel
  • Backbone.HasOne
  • Backbone.HasMany
  • etc...

My problem is that I can not have them all exported. What is the right way to do this with webpack?

尝试按此处所述使用关系填充

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM