Last active
May 14, 2017 07:13
-
-
Save noinkling/218dc503dc6bb5f844fa53c8a0bc1d32 to your computer and use it in GitHub Desktop.
Webpack module bug
This file contains hidden or 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
export default 'foo'; |
This file contains hidden or 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
import foo from './foo'; | |
const bar = 'bar'; | |
let val; | |
[ val = bar ] = []; | |
console.log(val); // "bar" | |
({ val = bar } = {}); | |
console.log(val); // "bar" | |
const [ val2 = foo ] = []; | |
console.log(val2); // "foo" | |
const { val3 = foo } = {}; | |
console.log(val3); // "foo" | |
[ val = foo ] = []; // ReferenceError: foo is not defined | |
({ val = foo } = {}); // ReferenceError: foo is not defined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment