4 ms·
Doesn't this have more to do with Babel and less to do with Webpack? I think this originates with how Babel treats ES6 Modules differently from CommonJS, and if
by dvcc 10y ago
Doesn't this have more to do with Babel and less to do with Webpack? I think this originates with how Babel treats ES6 Modules differently from CommonJS, and if you were to instead do:
const foo = require('./bar').foo
it would keep the name the same?
EDIT: https://github.com/jamietre/babel-plugin-transform-es2015-modules-commonjs-simple https://github.com/jamietre/babel-plugin-transform-es2015-mo...
There is a better explanation with a partial solution.
- seniorsassycat 10y agoI don't think Babel is the cause, not in this case. Im using typescript in full es6 mode, module and target are both es6. Babel isn't even in my node_modules.
- jamra 10y agoTypescript doesn't need babel since the typescript compiler supports es6.
- dvcc 10y agoThe 'let' should have made me re-think the problem.
- deleted 10y ago[deleted]