|
|
@@ -82,9 +82,11 @@ function generateExtensionModuleTsSource(
|
|
|
return `/** This file is generated by the createExtensionsModules() function in devkit/common.ts. Do not edit. */
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
import { NgModule } from '@angular/core';
|
|
|
-
|
|
|
-${modules.map(e => `import { ${e.className} } from '${e.path}';`).join('\n')}
|
|
|
-
|
|
|
+${
|
|
|
+ modules.length === 0
|
|
|
+ ? ''
|
|
|
+ : '\n' + modules.map(e => `import { ${e.className} } from '${e.path}';`).join('\n')
|
|
|
+}
|
|
|
/**
|
|
|
* This is a placeholder module for UI extensions provided by the AdminUiPlugin \`extensions\` option.
|
|
|
* When the {@link createExtensionsModules} function is executed, this module gets temporarily replaced
|
|
|
@@ -92,8 +94,9 @@ ${modules.map(e => `import { ${e.className} } from '${e.path}';`).join('\n')}
|
|
|
*/
|
|
|
@NgModule({
|
|
|
imports: [
|
|
|
- CommonModule,
|
|
|
- ${modules.map(e => e.className + ',').join('\n')}
|
|
|
+ CommonModule,${
|
|
|
+ modules.length === 0 ? '' : '\n' + modules.map(e => ' ' + e.className + ',').join('\n')
|
|
|
+ }
|
|
|
],
|
|
|
})
|
|
|
export class ${type === 'lazy' ? 'Lazy' : 'Shared'}ExtensionsModule {}
|