Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: config path problem on windows (#4501)
* add test * fix
- Loading branch information
Showing
4 changed files
with
23 additions
and
3 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
11 changes: 11 additions & 0 deletions
11
test/cli/samples/config-cwd-case-insensitive-es6/_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,11 @@ | ||
function toggleCase(s) { | ||
return s == s.toLowerCase() ? s.toUpperCase() : s.toLowerCase(); | ||
} | ||
|
||
module.exports = { | ||
onlyWindows: true, | ||
description: "can load ES6 config with cwd that doesn't match realpath", | ||
command: 'rollup -c', | ||
cwd: __dirname.replace(/^[A-Z]:\\/i, toggleCase), | ||
execute: true | ||
}; |
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 @@ | ||
assert.equal( ANSWER, 42 ); |
9 changes: 9 additions & 0 deletions
9
test/cli/samples/config-cwd-case-insensitive-es6/rollup.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,9 @@ | ||
import replace from '@rollup/plugin-replace'; | ||
|
||
export default { | ||
input: 'main.js', | ||
output: { | ||
format: 'cjs' | ||
}, | ||
plugins: [replace({ preventAssignment: true, ANSWER: 42 })] | ||
}; |