It is especially neat when importing the scripts from the parent theme in a child theme. In one of my themes I do it like this:
```js
// routes.js
import home from './routes/home'
export default {
home: {
init() {
console.log('Home route fired.')
}
}
}
```
```js
// main.js
/**
* Parent Themes Script
*/
import '../../../../core-theme/resources/assets/scripts/main';
/**
* Internal modules
*/
import routes from './routes'
/**
* Hook in to the parent themes router
*/
document.addEventListener('routed', e => {
let route = e.detail.route,
fn = e.detail.fn;
if (routes[route] && typeof routes[route][fn] === 'function') {
routes[route][fn]();
}
});
```