Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Build-time __dirname in browser test builds #65

Merged
merged 1 commit into from
Dec 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ function getConfig({target, env, dir, watch, cover}) {
setImmediate: false,
// Mocking __filename and __dirname is probably harmless, but for consistency let's keep it off for now.
__filename: false,
__dirname: false,
// Tape also requires __dirname, remove once we don't use tape anymore
__dirname: env === 'test' && target === 'web' ? true : false,
/**
* Tape requires `fs` to be defined
*/
Expand Down