hsiaosiyuan0/july

deal with the unused-import-eliminating

Opened this issue · 0 comments

import { Hello } from "./components/Hello";

console.log(Hello); // note this line
ReactDOM.render(jul`Hello`, document.getElementById("app"));

If the console.log(Hello) is omitted, the compiled result will produce Hello is not defined error, this is caused by the unused-import-eliminating, although we use Hello in July, but it's opaque to JavaScript compiling tool-chain, so the tool-chain consider Hello is unused then eliminates it, this behavior happens before the babel-plugin-july do its transform, so I'd like to find a way to resolve this problem.