Skip to content

Instantly share code, notes, and snippets.

@klzns
Last active June 23, 2016 16:44
Show Gist options
  • Save klzns/1fee3381ad13c82477c385011e7e85c7 to your computer and use it in GitHub Desktop.
Save klzns/1fee3381ad13c82477c385011e7e85c7 to your computer and use it in GitHub Desktop.
System.config({defaultJSExtensions: true});
System.config({
baseUrl: '/',
packages: {
'[email protected]': {
map: {
'vtex.sdk': '[email protected]',
'n1.shelf': '[email protected]',
'vtex.banner': '[email protected]',
'npm.react': '[email protected]'
}
},
'[email protected]': {
map: {
'npm.lodash': '[email protected]',
'npm.react': '[email protected]'
}
},
'[email protected]': {
map: {
'npm.lodash': '[email protected]',
'npm.react': '[email protected]'
}
},
'[email protected]': {
map: {
'npm.react': '[email protected]',
'npm.lodash': '[email protected]'
}
}
},
map: {
'react': '[email protected]/react.js' // this avoids changing the source of React
}
})
window.storefront = {
route: 'home',
settings: [
{
area: 'home',
data: {
component: '[email protected]/Root',
settings: null
}
},
{
area: 'home/content',
data: {
component: '[email protected]/DefaultTemplate',
settings: null
}
},
{
area: 'home/content/body',
data: {
component: '[email protected]/HomePage',
settings: null
}
},
{
area: 'home/content/body/banner',
data: {
component: '[email protected]/Banner',
settings: {
foo: 'bar'
}
}
},
{
area: 'home/content/body/shelf',
data: {
component: '[email protected]/Shelf',
settings: {
bar: 'foo'
}
}
}
]
}
System.import('./[email protected]/index.js');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment