Skip to content

Commit

Permalink
Merge pull request #296 from ryanto/vendor-whatwg-fetch-dev-dep
Browse files Browse the repository at this point in the history
Vendor whatwg-fetch using rollup+devDep
  • Loading branch information
xg-wang committed Mar 21, 2020
2 parents 6497376 + 760bb2c commit 4d452fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
5 changes: 0 additions & 5 deletions iife-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ var Pretender = (function(self) {
? getModuleDefault(require('fake-xml-http-request'))
: self.FakeXMLHttpRequest;

// fetch related ponyfills
var FakeFetch = appearsBrowserified
? getModuleDefault(require('whatwg-fetch'))
: self.WHATWGFetch;

/*==ROLLUP_CONTENT==*/

if (typeof module === 'object') {
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"rollup-plugin-typescript": "^1.0.0",
"abortcontroller-polyfill": "^1.1.9",
"coveralls": "^3.0.9",
"es6-promise": "^4.0.5",
Expand All @@ -45,16 +44,17 @@
"release-it": "^12.4.3",
"release-it-lerna-changelog": "^1.0.3",
"rollup": "^1.1.2",
"rollup-plugin-typescript": "^1.0.0",
"sinon": "^9.0.0",
"tslib": "^1.9.3",
"typescript": "~3.1.1",
"typescript-eslint-parser": "^21.0.2",
"url-parse": "^1.4.7"
"url-parse": "^1.4.7",
"whatwg-fetch": "^3.0.0"
},
"dependencies": {
"fake-xml-http-request": "^2.1.1",
"route-recognizer": "^0.3.3",
"whatwg-fetch": "^3.0.0"
"route-recognizer": "^0.3.3"
},
"files": [
"dist",
Expand All @@ -65,8 +65,7 @@
"pretender": {
"deps": [
"route-recognizer",
"fake-xml-http-request",
"whatwg-fetch"
"fake-xml-http-request"
],
"exports": "Pretender"
}
Expand Down
1 change: 0 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const typescript = require('rollup-plugin-typescript');
const pkg = require('./package.json');
const fs = require('fs');
const globals = {
'whatwg-fetch': 'FakeFetch',
'fake-xml-http-request': 'FakeXMLHttpRequest',
'route-recognizer': 'RouteRecognizer',
'url-parse': 'urlParse'
Expand Down

0 comments on commit 4d452fd

Please sign in to comment.