Skip to content

AMD export is now a named module in v1.6.21 #274

@glenpike

Description

@glenpike

This is related to #269 and #267 from what I can see, but I will post here as a note that might help other people.

The new export mechanism generated by Rollup JS seems to have exported topojson as a named module. This means you can no longer load the module via it's file path when you use it in AMD / RequireJS you have to create an alias, e.g.

v1.6.20

//This worked okay
define(['bower_components/topojson/topjson'], function(topojson) {
  console.log(topojson.feature);
})

v1.6.21

require.config({
  paths: {
    topojson: 'bower_components/topojson/topjson'
  }
});
define(['topojson'], function(topojson) {
  console.log(topojson.feature);
})

http://requirejs.org/docs/api.html#modulename
http://stackoverflow.com/questions/19720646/named-module-vs-unnamed-module-in-requirejs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions