Skip to content

Import dayjs ESM module variants #70

@netmikey

Description

@netmikey

In order to get rid of warnings like:

Warning: /node_modules/material-dayjs-adapter/fesm2020/tabuckner-material-dayjs-adapter.mjs depends on 'dayjs'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Replace all imports like

import dayjs from 'dayjs';
import duration from 'dayjs/plugin/duration';

with the ESM module variants:

import dayjs from 'dayjs/esm';
import duration from 'dayjs/esm/plugin/duration';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions