Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.
This repository was archived by the owner on May 14, 2021. It is now read-only.

Unable to specify a specific import from a specific module #253

@43081j

Description

@43081j

So you provide two options:

  • moduleName
  • importName

Used like so:

// moduleName = module
import {x, y} from 'module';
x`test`; // parsed
y`test`; // parsed
// moduleName = module
// importName = y
import {x, y} from 'module';
x`test`; // parsed
y`test`; // parsed
y(whatever)`test`; // parsed
y.whatever`test`; // parsed

Surely this isn't how importName should work. I would expect only tagged templates which use the specified import name to be parsed, rather than ALL imported names and the extra styled-specific stuff.

Like this:

// moduleName = module
// importName = y
import {x, y} from 'module';
x`test`; // NOT parsed
y`test`; // parsed

With this ability we could use the same component on other tagged template css libraries. Something like LitElement. But we can't yet because we over-parse:

css`this is css`; // parsed
html`this is html`; // parsed <- WRONG, it shouldn't be

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions