I’ve got these classes in my scripts like
import Component from '../Component';
export default class Dropdown extends Component {
...
}
export var __usedefault = true;
This works excellent in development mode. But when I build it using
var stealTools = require('steal-tools');
stealTools.build({
config: __dirname + '/package.json!npm'
},
{
bundleSteal: true,
});
Later I load these files like so:
define(['./Dropdown'], function(Dropdown) {
new Dropdown({label:'Language', name: 'language', required:true, defaultValue: 'en', options: {
'en': 'English',
'nl': 'Nederlands',
'de': 'Deutsch'
}}),
);
I get an error-message: ‘Dropdown is not a constructor’
Looking in the debugger I notice that de parameter Dropdown is no longer a function Dropdown(), but an object:
{
_esModule: true,
_useDefault:true,
default: Dropdown(),
__proto__: Object
}
How should I fix this?