To connect your extension the Digital Workspace, you'll need to import the module with your customizations, and include the assets folder in the build process.
-
Import the NgModule into the ADW application by adding it to
the imports statement in
./apps/content-ee/src/app/extension.module.ts :
import { MyAdwCustomizationsModule } from '@myorg/my-adw-customizations'; @NgModule({ imports: [ environment.plugins.aca_aos ? AosExtensionModule : [], environment.plugins.aca_about ? AcaAboutModule : [], environment.plugins.adw_governance ? RecordModule : [], environment.plugins.adw_aps1 ? ProcessServicesExtensionModule : [], environment.plugins.adw_content_services ? ContentServicesExtensionModule : [], environment.plugins.adw_office365 ? MicrosoftOfficeOnlineIntegrationExtensionModule : [], environment.plugins.adw_analytics ? ContentEeAnalyticsModule : [], MyExtensionModule ], providers: [ { provide: PACKAGE_JSON, useValue: packageJson }, { provide: DEV_MODE_TOKEN, useValue: true }, ], }) export class AppExtensionsModule {}Note: If VS Code shows a lot of errors when opening the file, due to being unable to resolve the modules, it may be connected to the absence of tsconfig.json in the content-ee app.This is not a blocker, and one solution is to create a tsconfig.json file alongside tsconfig.app.json with the following content:
{ "extends": "./tsconfig.app.json" } -
Add your source code to the application bundle by including the assets folders
in the build process.
This guarantees that the files are taken into account during the application build process.
Asset Type Input Expected Destination Descriptor file extensions/EXT_NAME/descriptor /assets/plugins Translations extensions/EXT_NAME/i18n /assets/plugin-name/i18n Assets extensions/EXT_NAME/assets /assets/ -
Edit the ./apps/content-ee/project.json file by adding the
following configuration to the targets.build.options.assets section:
{ "input": "extensions/my-extension/descriptor", "output": "/assets/plugins", "glob": "*.json" }, { "input": "extensions/my-extension/i18n", "output": "/assets/my-extension/i18n", "glob": "**/*" }, { "input": "extensions/my-extension/assets", "output": "/assets/", "glob": "**/*" }You may not need the entire configuration, but we'll add them once to cover more scenarios.