Skip to content

Commit

Permalink
Fix usage of fs and path inside ES build
Browse files Browse the repository at this point in the history
  • Loading branch information
nebrelbug committed Sep 18, 2020
1 parent 47f8b0f commit c78d52b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"@commitlint/config-conventional": "^9.1.2",
"@size-limit/preset-small-lib": "^4.6.0",
"@types/jest": "^26.0.13",
"@types/node": "^14.10.1",
"@types/node": "^14.11.1",
"@typescript-eslint/eslint-plugin": "^4.1.0",
"@typescript-eslint/parser": "^4.1.0",
"commitizen": "^4.2.1",
Expand Down
9 changes: 6 additions & 3 deletions src/file-methods.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export var fs = require('fs')
export var path = require('path')
export * as fs from 'fs'

export var readFileSync = fs.readFileSync
export { readFileSync } from 'fs'

import * as path from 'path'

export { path }
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1577,10 +1577,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.4.tgz#a145cc0bb14ef9c4777361b7bbafa5cf8e3acb5a"
integrity sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==

"@types/node@^14.10.1":
version "14.10.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.10.1.tgz#cc323bad8e8a533d4822f45ce4e5326f36e42177"
integrity sha512-aYNbO+FZ/3KGeQCEkNhHFRIzBOUgc7QvcVNKXbfnhDkSfwUv91JsQQa10rDgKSTSLkXZ1UIyPe4FJJNVgw1xWQ==
"@types/node@^14.11.1":
version "14.11.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.1.tgz#56af902ad157e763f9ba63d671c39cda3193c835"
integrity sha512-oTQgnd0hblfLsJ6BvJzzSL+Inogp3lq9fGgqRkMB/ziKMgEUaFl801OncOzUmalfzt14N0oPHMK47ipl+wbTIw==

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
Expand Down

0 comments on commit c78d52b

Please sign in to comment.