Skip to content

Instantly share code, notes, and snippets.

@AzMoo
Created September 26, 2016 00:31
Show Gist options
  • Save AzMoo/78e67e4f90fbccdaa33cff0d7a9782be to your computer and use it in GitHub Desktop.
Save AzMoo/78e67e4f90fbccdaa33cff0d7a9782be to your computer and use it in GitHub Desktop.
if(window.location.pathname == '/vehicles/standard-fields/') {
require.ensure(['./vehicles/standard-fields/main'], function(require){
var standard_fields = require('./vehicles/standard-fields/main')
standard_fields.default()
})
} else if(window.location.pathname == '/service/bom-builder/') {
require.ensure(['./service/bom-builder/main'], function(require){
var bom_builder = require('./service/bom-builder/main')
bom_builder.default()
})
} else if(window.location.pathname == '/dashboard/') {
require.ensure(['./dashboard/main'], function(require){
var parts_dashboard = require('./dashboard/main')
parts_dashboard.default()
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment