155
rated 0 times
[
156]
[
1]
/ answers: 1 / hits: 15793
/ 6 Years ago, tue, august 28, 2018, 12:00:00
Given the following modules, how do I import the constants module and avoid having the default property included:
// constants.es6
export default {
foo: 'foo',
bar: 'bar'
}
// anotherModule.es6
import * as constants from './constants';
results in constants.default.foo
I can't seem to get the syntax correct to end up with constants.foo
More From » ecmascript-6