Skip to content

Commit

Permalink
fix: import sub-modules from sub-entry points, but not from relative …
Browse files Browse the repository at this point in the history
…paths (#11976)

closes #11931
  • Loading branch information
Platonn committed Apr 14, 2021
1 parent aa6b33c commit fccf4df
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
24 changes: 3 additions & 21 deletions feature-libs/cart/import-export/core/import-export-core.module.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
import { ModuleWithProviders, NgModule } from '@angular/core';
import { provideDefaultConfig } from '@spartacus/core';
import { defaultImportExportConfig } from './config/default-import-export-config';

@NgModule({
providers: [
// TODO: Avoid using duplicated config #11931
provideDefaultConfig({
importExport: {
fileValidity: {
maxSize: 1,
allowedExtensions: [
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd.ms-excel',
'text/csv',
],
checkEmptyFile: true,
},
file: {
separator: ',',
},
},
}),
],
})
@NgModule({})
export class ImportExportCoreModule {
static forRoot(): ModuleWithProviders<ImportExportCoreModule> {
return {
ngModule: ImportExportCoreModule,
providers: [provideDefaultConfig(defaultImportExportConfig)],
};
}
}
3 changes: 2 additions & 1 deletion feature-libs/cart/import-export/core/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './services/index';
export * from './config/index';
export * from './import-export-core.module';
export * from './model/index';
export * from './services/index';
4 changes: 2 additions & 2 deletions feature-libs/cart/import-export/import-export.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { ImportExportCoreModule } from './core/import-export-core.module';
import { ExportEntriesModule } from './components/export-entries/export-entries.module';
import { ExportEntriesModule } from '@spartacus/cart/import-export/components';
import { ImportExportCoreModule } from '@spartacus/cart/import-export/core';

@NgModule({
imports: [ImportExportCoreModule.forRoot(), ExportEntriesModule],
Expand Down

0 comments on commit fccf4df

Please sign in to comment.