-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export build time not found packages on runtime (#518)
* Export build time not found packages on runtime Exporting eval results * test: add integration test for runtime-notfound
- Loading branch information
1 parent
818848c
commit 51aef03
Showing
9 changed files
with
42 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__non_webpack_require__('UNKNOWN'); | ||
module.exports = __non_webpack_require__('UNKNOWN'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = 'foo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const assert = require('assert'); | ||
const childProcess = require('child_process'); | ||
const path = require('path'); | ||
|
||
(function main() { | ||
if (process.env.CHILD !== 'notfound-eval') { | ||
const cp = childProcess.fork(__filename, [], { | ||
stdio: 'inherit', | ||
env: Object.assign({}, process.env, { | ||
CHILD: 'notfound-eval', | ||
NODE_PATH: path.join(process.cwd(), 'test/integration/node-path') | ||
}) | ||
}); | ||
cp.on('exit', (code) => { | ||
if (code == null) { | ||
code = 1; | ||
} | ||
process.exit(code); | ||
}) | ||
return; | ||
} | ||
const foo = require('foo'); | ||
assert.strictEqual(foo, 'foo'); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters