bundle-loader
bundle-loader copied to clipboard
named export is `undefined`
When using loader's syntax I get undefined for named exports:
// Comey.js
const Dismissed = () => <div> :| </div>
const Career = () => <div> ;| </div>
export {
Dismissed as default,
Career
};
// main.js
import Dismissed, { Career } from 'bundle-loader?lazy!./Comey';
console.log(Dismissed); // function (cb) { blah }
console.log(Career); // `undefined`
// - "webpack": "2.4.1",
// - "bundle-loader": "0.5.5",
@snikobonyadrad Also when using require() ?
Yes sir:
var Dismissed = require('bundle-loader?lazy!./Comey');
console.log(Dismissed); // [function]
console.log(Dismissed.Career); // `undefined`
// versus
var Dismissed = require('./Comey');
console.log(Dismissed); // [function]
console.log(Dismissed.Career); // [function]
Your webpack.config.js and ideally a small test repo please :)
Here you go webpack-bundle-loader-bug. If you have cloud9 account I can give you access there too. Thanks.