Skip to content

Duplicated import declarations #3

Description

@kcmr

Hi,

I'm facing an issue when I import two style files. The import declaration is added for each of the files, producing an error due to the duplicated import name (css).

The following code:

import styles from './styles.css';
import another from './another.css';

Produces this result:

import { css as _css } from "lit-element";
const styles = _css`:host {
  display: block;
}
`;
import { css as _css } from "lit-element";
const another = _css`:host {
  display: block;
}
`;

I'm happy to contribute with a PR, but I have a question. Why do you want to rename the import identifier? Can we just use the provided name from the plugin options? (import { tagged } from 'module')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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