You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Much of webnpm is handling the need for npm and browserify to synchronously read files whose filenames are not given as string literal arguments. If they were, brfs could be used to inline their contents at build time. Since they are not, webnpm replaces calls to readFileSync with its own function that returns file contents from an object of 'preloaded' files, currently:
maybe this is worth generalizing into a browserify transform module? (or adding as an enhancement to brfs? not sure if it fits)
Note: fs.readFile (async) is bridged to web-fs, but that API is async and has no synchronous equivalent by design — though see also #3 (if switch to a different fs-compatible filesystem backend, may be able to also implement fs.readFileSync)
The text was updated successfully, but these errors were encountered:
Much of webnpm is handling the need for npm and browserify to synchronously read files whose filenames are not given as string literal arguments. If they were, brfs could be used to inline their contents at build time. Since they are not, webnpm replaces calls to readFileSync with its own function that returns file contents from an object of 'preloaded' files, currently:
maybe this is worth generalizing into a browserify transform module? (or adding as an enhancement to brfs? not sure if it fits)
Note: fs.readFile (async) is bridged to web-fs, but that API is async and has no synchronous equivalent by design — though see also #3 (if switch to a different fs-compatible filesystem backend, may be able to also implement fs.readFileSync)
The text was updated successfully, but these errors were encountered: