I am trying to achieve the following in Aurelia.
Have a main shell project. This will have all the dependencies for the project and the route config will be retrieved from an api so it is dynamic. This project will be built and deployed to the server.
For each app page I want to effectively branch from the main shell app, and add a single page contained in its own folder. I then want to be able to build the project and manually deploy just the page bundle onto the server.
The aim is to be able to create pages independently and then add them to the main app and access them by updating the route config provided through the api.
The problem I am having is with the bundling. I am currently using the aurelia cli bundler (I have previously given up with webpack). I have bundled the app shell project and in the page project I have created the page folder as a separate bundle.
When I deploy the page bundle with the shell bundle and add the page route to the config it doesn't work. The page bundle is being retrieved over the network. But I am getting the following error:
Cannot read property '__useDefault' of undefined
Which is generated in the vendor-bundle.js file (from the shell project).
If I manually edit the vendor-bundle.js file and add the page bundle into the path configuration of the _aureliaConfigureModuleLoader function it works.
Is there a way to avoid this configuration? Or is there another approach I should be using to achieve this?