aurelia / aurelia/cli

[feature requests] Multiple bundles/targets & platforms

Open
#724 14 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
402
Forks
134
PR merge metrics
No merged PRs in 30d

Description

I've been trying to figure out how to support multi-spa and leverage build targets and platform in aurelia.json to support a more sophisticated build setup.

attempts:
1. just standard splitting bundles to break off dependencies (each SPA may have different 3rd-party vendor libraries): https://github.com/diegohb/samples-aurelia-vanilla_cli/tree/master-task017
--this broke the [karma tests ](https://github.com/aurelia/cli/issues/689) but otherwise worked.
2. tried to trick the au bundler to update a razor partial that each razor view references so that both root container SPA pages get the bundler rewrite: https://github.com/diegohb/samples-aurelia-vanilla_cli/tree/master-task018
3. Now i'm trying to specify SPA-specific bundles and hopefully share the common aurelia & systemjs bundle in both..

**The requests:**
1. ability to specify array of strings to build.targets[x].index . eg ["index1.html", "index2.html"]

2. change updateIndexForConfig() method to work against any type of file, just look for tag within file and update it.

3. change build.loader.configTarget property to reference build.targets.id to load it's .index property. This will help avoid having an additional place to change the value of index page to be updated.

4. add property "buildTarget" to bundle object that works like dependencies[x].env property (can specify multiple target concatenated with ampersand).

5. add property "platform" to buildTarget to specify what targets are meant for which platforms and then allow parameter "platform". eg. au build --platform "netcore2.0" or "electron" etc..

I wonder if anyone can provide links to source file(s) related to each one of these requests ? I'd love to look at helping out with some.. maybe the first one for starters.. 😃

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.