Mark Andrus Roberts 0aef97215c Call fs.readFileSync with __dirname
Node's fs APIs resolve relative paths relative to the current working directory:

https://nodejs.org/api/fs.html#fs_file_paths

This creates a problem if you try to require the wasm-bindgen-generated
JavaScript from a different directory. For example, if you have

  build/foo.js
  build/foo_bg.js
  build/foo_bg.wasm

and another script, script/index.js, that requires build/foo.js. We can instead
use __dirname to get the correct path to the file.
2018-04-09 17:38:22 -07:00
..
2018-04-09 15:18:39 -07:00
2018-04-09 15:18:39 -07:00
2018-04-09 15:18:39 -07:00
2018-04-09 15:18:39 -07:00