Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Use browser relative path algorithm for chunks (#2902)
- Loading branch information
1 parent
b1df517
commit 7179390
Showing
5 changed files
with
33 additions
and
6 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
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
23 changes: 23 additions & 0 deletions
23
test/function/samples/relative-outside-external/_config.js
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,23 @@ | ||
const assert = require('assert'); | ||
const cwd = process.cwd; | ||
|
||
module.exports = { | ||
description: 'correctly resolves relative external imports from outside directories', | ||
options: { | ||
external() { | ||
return true; | ||
} | ||
}, | ||
before() { | ||
process.cwd = () => '/'; | ||
}, | ||
context: { | ||
require(id) { | ||
return id; | ||
} | ||
}, | ||
exports(exports) { | ||
process.cwd = cwd; | ||
assert.strictEqual(exports.value, '../../../test.js'); | ||
} | ||
}; |
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 @@ | ||
export {default as value} from '../../../test.js'; |