-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Given that Angular uses esbuild, it should be possible to provide a plugin for Angular as well.
// angular.json
{
"projects": {
"app": {
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"plugins": ["@junobuild/angular-plugin"]
}
}
}
}
}
}
Maybe we also want a schematic to do
ng add @junobuild/angular-plugin
Something
// schematics/ng-add/index.ts
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
export function ngAdd(): Rule {
return (tree: Tree, context: SchematicContext) => {
// Modify angular.json to add the plugin
const angularJson = JSON.parse(tree.read('angular.json')!.toString());
// ... add plugin to build options
tree.overwrite('angular.json', JSON.stringify(angularJson, null, 2));
return tree;
};
}
Metadata
Metadata
Assignees
Labels
No labels