Installation
$ npm install babel-plugin-safe-require --save-dev
.babelrc
In
;
Out
const path = ; const join } = path; const test = ; const a b c } = test; const fs = ; ; { if typeof obj === 'string' try obj = ; catch e console; obj = null; return obj && obj__esModule && typeof objdefault !== "undefined" ? objdefault : obj;}