Unverified Commit dda9be09 authored by overlookmotel's avatar overlookmotel Committed by GitHub

Failing test for SWC `shakeExports` and JSX (#35735)

<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order to make sure your PR is handled as smoothly as possible we
request that you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [X] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

Failing test for #35734.
parent ff2159d4
...@@ -216,6 +216,7 @@ fn shake_exports_fixture(input: PathBuf) { ...@@ -216,6 +216,7 @@ fn shake_exports_fixture(input: PathBuf) {
String::from("keep2").into(), String::from("keep2").into(),
String::from("keep3").into(), String::from("keep3").into(),
String::from("keep4").into(), String::from("keep4").into(),
String::from("keep5").into(),
], ],
}) })
}, },
......
...@@ -34,3 +34,12 @@ export {keep3, asKeep as keep4, removeNamed} ...@@ -34,3 +34,12 @@ export {keep3, asKeep as keep4, removeNamed}
export default function removeDefault() { export default function removeDefault() {
console.log('should be removed') console.log('should be removed')
} }
function ShouldBeKept() {
return 'should be kept'
}
let shouldBeKept2 = 'should be kept'
export function keep5() {
return <ShouldBeKept val={shouldBeKept2} />
}
...@@ -7,3 +7,10 @@ export let keep2 = 'should be kept'; ...@@ -7,3 +7,10 @@ export let keep2 = 'should be kept';
let keep3 = 'should be kept'; let keep3 = 'should be kept';
let asKeep = 'should be kept'; let asKeep = 'should be kept';
export { keep3, asKeep as keep4 }; export { keep3, asKeep as keep4 };
function ShouldBeKept() {
return 'should be kept';
}
let shouldBeKept2 = 'should be kept';
export function keep5() {
return <ShouldBeKept val={shouldBeKept2}/>;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment