Skip to content

Commit

Permalink
fix(tslib): ezolenko#286
Browse files Browse the repository at this point in the history
  • Loading branch information
bluelovers committed Nov 3, 2021
1 parent b76ff69 commit 3400597
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"dependencies": {
"@rollup/pluginutils": "^4.1.0",
"@yarn-tool/resolve-package": "^1.0.36",
"find-cache-dir": "^3.3.1",
"fs-extra": "8.1.0",
"resolve": "1.20.0",
Expand Down
5 changes: 3 additions & 2 deletions src/tslib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ export let tslibVersion: string;
try
{
// tslint:disable-next-line:no-string-literal no-var-requires
const tslibPackage = require("tslib/package.json");
const tslibPath = require.resolve("tslib/" + tslibPackage.module);
const _ = require("@yarn-tool/resolve-package").resolvePackage('tslib');
const tslibPackage = _.pkg;
const tslibPath = _.resolveLocation(tslibPackage.module);
tslibSource = readFileSync(tslibPath, "utf8");
tslibVersion = tslibPackage.version;
} catch (e)
Expand Down

0 comments on commit 3400597

Please sign in to comment.