{"action":"created","issue":{"url":"https://api.github.com/repos/dherges/ng-packagr/issues/460","repository_url":"https://api.github.com/repos/dherges/ng-packagr","labels_url":"https://api.github.com/repos/dherges/ng-packagr/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/dherges/ng-packagr/issues/460/comments","events_url":"https://api.github.com/repos/dherges/ng-packagr/issues/460/events","html_url":"https://github.com/dherges/ng-packagr/issues/460","id":285720503,"number":460,"title":"ng-packagr without a umd bundle","user":{"login":"Inlustra","id":2565465,"avatar_url":"https://avatars2.githubusercontent.com/u/2565465?v=4","gravatar_id":"","url":"https://api.github.com/users/Inlustra","html_url":"https://github.com/Inlustra","followers_url":"https://api.github.com/users/Inlustra/followers","following_url":"https://api.github.com/users/Inlustra/following{/other_user}","gists_url":"https://api.github.com/users/Inlustra/gists{/gist_id}","starred_url":"https://api.github.com/users/Inlustra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inlustra/subscriptions","organizations_url":"https://api.github.com/users/Inlustra/orgs","repos_url":"https://api.github.com/users/Inlustra/repos","events_url":"https://api.github.com/users/Inlustra/events{/privacy}","received_events_url":"https://api.github.com/users/Inlustra/received_events","type":"User","site_admin":false},"labels":[{"id":606999534,"url":"https://api.github.com/repos/dherges/ng-packagr/labels/wontfix","name":"wontfix","color":"ffffff","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-03T15:32:04Z","updated_at":"2018-02-22T22:46:13Z","closed_at":null,"author_association":"NONE","body":"## Type of Issue\r\n\r\n```\r\n[ ] Bug Report\r\n[x] Feature Request\r\n```\r\n\r\n## Description\r\n\r\nWe're currently using Ionic that doesn't export any of the bundles in a UMD format (Or maybe we have misunderstood?) \r\n\r\nAn example of this is here: [https://github.com/ionic-team/ionic-native/blob/master/src/%40ionic-native/plugins/device/index.ts](https://github.com/ionic-team/ionic-native/blob/master/src/%40ionic-native/plugins/device/index.ts)\r\n\r\nWhich is in an npm repo at: `@ionic-native/device` (The exported js is at the bottom of this post)\r\n\r\n#### I don't believe we can export this file as a UMD bundle, and, in order for us to follow the ionic approach, is there a way we can disable UMD and ES5 module creation and just generate an esm2015 bundle and use this as main in package.json?\r\n\r\nIf not, is there a way we can import this module in a UMD fashion without bundling it? (As a peer-dependency/external)\r\n\r\n\r\nAnd in the npm repo, the index.js is as follows:\r\n```\r\nvar __extends = (this && this.__extends) || (function () {\r\n    var extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n    return function (d, b) {\r\n        extendStatics(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata = (this && this.__metadata) || function (k, v) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nimport { Injectable } from '@angular/core';\r\nimport { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';\r\n/**\r\n * @name Device\r\n * @description\r\n * Access information about the underlying device and platform.\r\n *\r\n * @usage\r\n * ```typescript\r\n * import { Device } from '@ionic-native/device';\r\n *\r\n * constructor(private device: Device) { }\r\n *\r\n * ...\r\n *\r\n * console.log('Device UUID is: ' + this.device.uuid);\r\n * ```\r\n */\r\nvar Device = (function (_super) {\r\n    __extends(Device, _super);\r\n    function Device() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    Device.decorators = [\r\n        { type: Injectable },\r\n    ];\r\n    /** @nocollapse */\r\n    Device.ctorParameters = function () { return []; };\r\n    __decorate([\r\n        CordovaProperty,\r\n        __metadata(\"design:type\", String)\r\n    ], Device.prototype, \"cordova\", void 0);\r\n    __decorate([\r\n        CordovaProperty,\r\n        __metadata(\"design:type\", String)\r\n    ], Device.prototype, \"model\", void 0);\r\n    __decorate([\r\n        CordovaProperty,\r\n        __metadata(\"design:type\", String)\r\n    ], Device.prototype, \"platform\", void 0);\r\n    __decorate([\r\n        CordovaProperty,\r\n        __metadata(\"design:type\", String)\r\n    ], Device.prototype, \"uuid\", void 0);\r\n    __decorate([\r\n        CordovaProperty,\r\n        __metadata(\"design:type\", String)\r\n    ], Device.prototype, \"version\", void 0);\r\n    __decorate([\r\n        CordovaProperty,\r\n        __metadata(\"design:type\", String)\r\n    ], Device.prototype, \"manufacturer\", void 0);\r\n    __decorate([\r\n        CordovaProperty,\r\n        __metadata(\"design:type\", Boolean)\r\n    ], Device.prototype, \"isVirtual\", void 0);\r\n    __decorate([\r\n        CordovaProperty,\r\n        __metadata(\"design:type\", String)\r\n    ], Device.prototype, \"serial\", void 0);\r\n    Device = __decorate([\r\n        Plugin({\r\n            pluginName: 'Device',\r\n            plugin: 'cordova-plugin-device',\r\n            pluginRef: 'device',\r\n            repo: 'https://github.com/apache/cordova-plugin-device',\r\n            platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'macOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']\r\n        })\r\n    ], Device);\r\n    return Device;\r\n}(IonicNativePlugin));\r\nexport { Device };\r\n//# sourceMappingURL=index.js.map\r\n```"},"comment":{"url":"https://api.github.com/repos/dherges/ng-packagr/issues/comments/367848910","html_url":"https://github.com/dherges/ng-packagr/issues/460#issuecomment-367848910","issue_url":"https://api.github.com/repos/dherges/ng-packagr/issues/460","id":367848910,"user":{"login":"Inlustra","id":2565465,"avatar_url":"https://avatars2.githubusercontent.com/u/2565465?v=4","gravatar_id":"","url":"https://api.github.com/users/Inlustra","html_url":"https://github.com/Inlustra","followers_url":"https://api.github.com/users/Inlustra/followers","following_url":"https://api.github.com/users/Inlustra/following{/other_user}","gists_url":"https://api.github.com/users/Inlustra/gists{/gist_id}","starred_url":"https://api.github.com/users/Inlustra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inlustra/subscriptions","organizations_url":"https://api.github.com/users/Inlustra/orgs","repos_url":"https://api.github.com/users/Inlustra/repos","events_url":"https://api.github.com/users/Inlustra/events{/privacy}","received_events_url":"https://api.github.com/users/Inlustra/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T22:46:13Z","updated_at":"2018-02-22T22:46:13Z","author_association":"NONE","body":"Thanks, that’s honestly what I expected, and also what we ended up doing!\r\n\r\nJust a shame that ionic haven’t followed suit! 😔"}}
{"actor":{"display_login":"Inlustra"}}