Skip to content

Commit

Permalink
use new polyfill-library package
Browse files Browse the repository at this point in the history
closes #12
  • Loading branch information
SebastianS90 committed Apr 11, 2018
1 parent b39dc52 commit b3664aa
Show file tree
Hide file tree
Showing 4 changed files with 962 additions and 1,818 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ or
npm install webpack-polyfill-injector --save-dev
```

**Please note:** Due to its dependency on `polyfill-service`, this package pulls in a lot of additional packages on installation. Furthermore, there is a heavy `postinstall` script in `polyfill-service`. The situation will improve a lot once [`polyfill-service#1267`](https://github.com/Financial-Times/polyfill-service/pull/1267) is merged and we can switch over to depend on the separate new `polyfill-library` package.


## Usage
```javascript
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"dependencies": {
"loader-utils": "^1.0.2",
"polyfill-service": "^3.24.0",
"polyfill-library": "^3.26.0-0",
"webpack-sources": "^1.0.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/PluginState.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ function loadCache(key, cache, loader) {
}

async function loadPolyfillSource(polyfill) { // eslint-disable-line require-await
const file = require.resolve(`polyfill-service/polyfills/__dist/${polyfill}/raw.js`);
const file = require.resolve(`polyfill-library/polyfills/__dist/${polyfill}/raw.js`);
return loadFileAsSource(file);
}

async function loadPolyfillMeta(polyfill) {
const file = require.resolve(`polyfill-service/polyfills/__dist/${polyfill}/meta.json`);
const file = require.resolve(`polyfill-library/polyfills/__dist/${polyfill}/meta.json`);
const content = await loadFileAsString(file);
return JSON.parse(content);
}
Expand Down
Loading

0 comments on commit b3664aa

Please sign in to comment.