Skip to content

Commit

Permalink
refactor: use import(file_path) for better dynamic import analysis
Browse files Browse the repository at this point in the history
Signed-off-by: Rong Sen Ng (motss) <wes.ngrongsen@gmail.com>
  • Loading branch information
motss committed Mar 29, 2022
1 parent 18a0c77 commit 8608d75
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 87 deletions.
168 changes: 84 additions & 84 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/date-picker-input/date-picker-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ export class DatePickerInput extends ElementMixin(DatePickerMixin(DatePickerMinM

const tasks = deps.map(n => globalThis.customElements.whenDefined(n));
const imports = [
'../date-picker/app-date-picker.js',
'../date-picker-input-surface/app-date-picker-input-surface.js',
].map(n => import(n));
import('../date-picker/app-date-picker.js'),
import('../date-picker-input-surface/app-date-picker-input-surface.js'),
];

try {
await Promise.all(imports);
Expand Down

0 comments on commit 8608d75

Please sign in to comment.